Skip to content

Commit 3d2e557

Browse files
Merge pull request #458 from BinaryStudioAcademy/task/OV-456-fix-styles
OV-456: fix styles
2 parents 4d81666 + c60fa26 commit 3d2e557

File tree

20 files changed

+52
-36
lines changed

20 files changed

+52
-36
lines changed

backend/src/bundles/public-video/public-video.controller.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ class PublicVideoController extends BaseController {
3636
body: { id: string };
3737
}>,
3838
): Promise<ApiHandlerResponse> {
39-
// eslint-disable-next-line no-console
40-
console.log(options.body, 'options.body');
4139
const jwt = options.body.id;
42-
// eslint-disable-next-line no-console
43-
console.log(jwt, 'jwt');
40+
4441
return {
4542
status: HTTPCode.OK,
4643
payload: await this.publicVideoService.findUrlByToken(jwt),

backend/src/bundles/videos/video.repository.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ class VideoRepository implements Repository {
2121

2222
public async findById(id: string): Promise<VideoEntity | null> {
2323
const video = await this.videoModel.query().findById(id).execute();
24-
// eslint-disable-next-line no-console
25-
console.log(video);
24+
2625
return video ? VideoEntity.initialize(video) : null;
2726
}
2827

backend/src/common/constants/white-routes.constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const WHITE_ROUTES = [
1313
},
1414
{
1515
path: `/api/v1${ApiPath.PUBLIC_VIDEO}/`,
16-
method: HTTPMethod.GET,
16+
method: HTTPMethod.POST,
1717
},
1818
{
1919
path: /\/v1\/documentation\/.*/,

backend/src/common/services/token/token.services.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ class TokenService {
3434

3535
public async getIdFromToken(token: string): Promise<string | null> {
3636
const payload = await this.verifyToken(token);
37-
// eslint-disable-next-line no-console
38-
console.log(payload);
37+
3938
return (payload?.['id'] as string) ?? null;
4039
}
4140
}

frontend/src/bundles/ai-avatars/components/avatar-card/avatar-card.tsx

+16-5
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,21 @@ const AvatarCard: React.FC<Properties> = ({
4040
}, [dispatch, id, image]);
4141

4242
return (
43-
<Card size="sm" borderRadius="lg" boxShadow="none" maxW="500px">
44-
<CardBody>
45-
<Box bg="background.50" borderRadius="md" position="relative">
46-
<Image src={image} alt="AI generated avatar image" />
43+
<Card size="sm" borderRadius="lg" boxShadow="none" maxW="250px">
44+
<CardBody position="relative" role="group">
45+
<Flex
46+
bg="background.50"
47+
borderRadius="md"
48+
position="relative"
49+
justifyContent="center"
50+
>
51+
<Image
52+
objectFit="cover"
53+
objectPosition="top"
54+
height="155px"
55+
src={image}
56+
alt="AI generated avatar image"
57+
/>
4758
<IconButton
4859
aria-label="favorite button"
4960
icon={<Icon as={IconName.HEART} boxSize={5} />}
@@ -54,7 +65,7 @@ const AvatarCard: React.FC<Properties> = ({
5465
right="0"
5566
onClick={handleLike}
5667
/>
57-
</Box>
68+
</Flex>
5869
<Box p="5px 0">
5970
<Text color="typography.900" fontWeight="600">
6071
{name}

frontend/src/bundles/ai-avatars/components/avatars-section/avatars-section.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from '~/bundles/common/components/components.js';
1515

1616
import { AvatarCard } from '../components.js';
17+
import styles from './styles.module.css';
1718

1819
type Properties = {
1920
subtitle: string;
@@ -62,11 +63,7 @@ const AvatarsSection: React.FC<Properties> = ({ subtitle, avatars, form }) => {
6263
Pick your favorites avatars to show them here!
6364
</Text>
6465
) : (
65-
<SimpleGrid
66-
minChildWidth="300px"
67-
justifyItems="center"
68-
spacing="40px"
69-
>
66+
<SimpleGrid className={styles['grid']} spacing="40px">
7067
{avatars.map(({ id, imgUrl, name, style, isLiked }) => (
7168
<AvatarCard
7269
key={`${id}-${style}`}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.grid {
2+
grid-template-columns: repeat(auto-fit, 250px);
3+
}

frontend/src/bundles/chat/pages/chat-modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ChatModal: React.FC<Properties> = ({
5252
<Chat
5353
messages={messages}
5454
onSendMessage={handleSendMessage}
55-
headerTitle="GPT4 Script Writer"
55+
headerTitle="AI Assistant"
5656
headerComment="Your secret to crafting compelling scripts effortlessly!"
5757
/>
5858
</ModalContent>

frontend/src/bundles/common/components/header/header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Header: React.FC<Properties> = ({ left, center, right }) => {
2323
</Box>
2424
)}
2525
<Box className={styles['center']}>{center}</Box>
26-
{right && <Box className={styles['right']}>{right}</Box>};
26+
{right && <Box className={styles['right']}>{right}</Box>}
2727
</Flex>
2828
);
2929
};

frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const GenerateScriptView: React.FC<Properties> = ({ onClose }) => {
5050
return (
5151
<>
5252
<Heading className={styles['script-view-heading']} variant="H3">
53-
Use Open AI to draft your video script
53+
Use our AI Assistant to draft your video script
5454
</Heading>
5555
<Tabs variant="unstyled" size="sm">
5656
<TabList className={styles['script-view-tab-list']}>

frontend/src/bundles/create-avatar/components/consent/consent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Consent: React.FC = () => {
1313
return (
1414
<Flex className={styles['flex-container']}>
1515
<Text variant={'title'} color={'background.600'} marginTop={'2vh'}>
16-
Concent
16+
Consent
1717
</Text>
1818
<Text variant={'body1'} color="typography.600" mb={3}>
1919
To prevent misuse of technology, we just need to confirm the

frontend/src/bundles/home/components/video-card/video-card.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const VideoCard: React.FC<Properties> = ({
115115
}, [dispatch, id]);
116116

117117
return (
118-
<Box borderRadius="8px" bg="white" padding="7px">
118+
<Box borderRadius="8px" maxWidth={'250px'} bg="white" padding="7px">
119119
<Box
120120
position="relative"
121121
role="group"

frontend/src/bundles/home/components/video-section/styles.module.css

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
scrollbar-width: thin;
55
scrollbar-color: #c1c1c1 #f1f1f1;
66
}
7+
8+
.grid {
9+
grid-template-columns: repeat(auto-fit, 250px);
10+
}

frontend/src/bundles/home/components/video-section/video-section.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ const VideoSection: React.FC<Properties> = ({ videos, title }) => {
4949
))}
5050
</Box>
5151
) : (
52-
<SimpleGrid
53-
columns={{ sm: 2, md: 3, lg: 4 }}
54-
spacing="20px"
55-
>
52+
<SimpleGrid spacing="20px" className={styles['grid']}>
5653
{videos.map(({ id, ...video }) => (
5754
<VideoCard key={id} id={id} {...video} />
5855
))}

frontend/src/bundles/preview/components/preview-wrapper.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { Preview } from '~/bundles/preview/pages/preview.js';
44

55
const PreviewWrapper: React.FC = () => {
66
const { jwt } = useParams<{ jwt: string }>();
7-
// eslint-disable-next-line no-console
8-
console.log('PreviewWrapper', jwt);
7+
98
return <Preview jwt={jwt ?? ''} />;
109
};
1110

frontend/src/bundles/template/components/template-card/template-card.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const TemplateCard: React.FC<Properties> = ({ id, name, previewUrl }) => {
4444
}, [handleWarningModalClose]);
4545

4646
return (
47-
<Box borderRadius="8px" bg="white" padding="7px">
47+
<Box borderRadius="8px" bg="white" maxWidth="250px" padding="7px">
4848
<Box
4949
position="relative"
5050
role="group"

frontend/src/bundles/template/components/templates-section/styles.module.css

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
background-color: white;
1010
color: #4a4a4a;
1111
}
12+
13+
.grid {
14+
grid-template-columns: repeat(auto-fit, 250px);
15+
}

frontend/src/bundles/template/components/templates-section/templates-section.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { type Template } from '~/bundles/template/types/types.js';
2121

2222
import { TemplateCard } from '../template-card/template-card.js';
2323
import { DEFAULT_TEMPLATE_PAYLOAD } from './constants.js';
24+
import styles from './styles.module.css';
2425

2526
type Properties = {
2627
templates: Template[];
@@ -113,7 +114,11 @@ const TemplatesSection: React.FC<Properties> = ({ templates }) => {
113114
</FormProvider>
114115
</Flex>
115116
</Flex>
116-
<SimpleGrid columns={{ sm: 2, md: 3, lg: 4 }} spacing="20px">
117+
<SimpleGrid
118+
minChildWidth="200px"
119+
spacing="20px"
120+
className={styles['grid']}
121+
>
117122
{templates.map(({ id, ...template }) => (
118123
<TemplateCard key={id} {...template} id={id} />
119124
))}

frontend/src/bundles/voices/components/voice-section/styles.module.css

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
scrollbar-width: thin;
55
scrollbar-color: #c1c1c1 #f1f1f1;
66
}
7+
8+
.grid {
9+
grid-template-columns: repeat(auto-fit, 250px);
10+
}

frontend/src/bundles/voices/components/voice-section/voice-section.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ const VoiceSection: React.FC<Properties> = ({ voices, title }) => {
5050
))}
5151
</Box>
5252
) : (
53-
<SimpleGrid
54-
columns={{ sm: 2, md: 3, lg: 4 }}
55-
spacing="20px"
56-
>
53+
<SimpleGrid className={styles['grid']} spacing="20px">
5754
{voices.map((voice) => (
5855
<VoiceCard voice={voice} key={voice.shortName} />
5956
))}

0 commit comments

Comments
 (0)