Skip to content

Commit 3420f9b

Browse files
authored
Merge pull request #212 from boostcampwm-2021/feature/fe/egg-debounce
Grid์—์„œ margin padding ๋นผ๊ณ  ์Šคํƒ€์ผ ๋Œ€ํญ ์ˆ˜์ •
2 parents 10d8308 + e942b14 commit 3420f9b

File tree

18 files changed

+38
-69
lines changed

18 files changed

+38
-69
lines changed

โ€Žfrontend/src/components/DashboardJobObjectives/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function DashboardJobObjectives({ jobObjectives, onDeleteJobObjective }: Props)
1515
return (
1616
<Wrapper>
1717
<Title>desired job</Title>
18-
<Col padding={16} alignItems='flex-end'>
18+
<Col alignItems='flex-end'>
1919
{jobObjectives.map((jobObjective) => (
2020
<Row key={jobObjective} alignItems='center'>
2121
<p>{jobObjective}</p>

โ€Žfrontend/src/components/ExternalPreview/style.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
33
const Wrapper = styled.div`
44
position: relative;
55
height: 100px;
6+
width: 360px;
67
overflow-y: hidden;
78
border-radius: 16px;
89
padding: 16px;
@@ -13,7 +14,7 @@ const Cover = styled.div`
1314
right: 0;
1415
left: 0;
1516
bottom: 0;
16-
background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 1));
17+
background: linear-gradient(rgba(0, 0, 0, 0), rgba(13, 13, 13, 1));
1718
`;
1819

1920
const LinkButton = styled.a`

โ€Žfrontend/src/components/Grid/index.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ import styled from '@emotion/styled';
33
interface Props {
44
justifyContent?: string;
55
alignItems?: string;
6-
margin?: number;
7-
marginTop?: number;
8-
marginBottom?: number;
9-
marginLeft?: number;
10-
marginRight?: number;
11-
padding?: number;
126
expanded?: boolean;
137
}
148

@@ -17,22 +11,14 @@ const Row = styled.div<Props>`
1711
flex-direction: row;
1812
justify-content: ${({ justifyContent }) => justifyContent};
1913
align-items: ${({ alignItems }) => alignItems};
20-
margin: ${({ margin }) => `${margin}px`};
21-
padding: ${({ padding }) => `${padding}px`};
2214
width: ${({ expanded }) => (expanded === true ? '100%' : 'unset')};
23-
margin-top: ${({ marginTop }) => (marginTop ? `${marginTop}px` : `unset`)};
24-
margin-bottom: ${({ marginBottom }) => (marginBottom ? `${marginBottom}px` : `unset`)};
25-
margin-left: ${({ marginLeft }) => (marginLeft ? `${marginLeft}px` : `unset`)};
26-
margin-right: ${({ marginRight }) => (marginRight ? `${marginRight}px` : `unset`)};
2715
`;
2816

2917
const Col = styled.div<Props>`
3018
display: flex;
3119
flex-direction: column;
3220
align-items: ${({ alignItems }) => alignItems};
3321
justify-content: ${({ justifyContent }) => justifyContent};
34-
margin: ${({ margin }) => `${margin}px`};
35-
padding: ${({ padding }) => `${padding}px`};
3622
height: ${({ expanded }) => (expanded === true ? '100%' : 'unset')};
3723
`;
3824

@@ -43,13 +29,11 @@ const Spacer = styled.div`
4329
Row.defaultProps = {
4430
justifyContent: 'unset',
4531
alignItems: 'unset',
46-
margin: 0,
4732
};
4833

4934
Col.defaultProps = {
5035
justifyContent: 'unset',
5136
alignItems: 'unset',
52-
margin: 0,
5337
};
5438

5539
export { Row, Col, Spacer };

โ€Žfrontend/src/components/Post/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Post({ post, onPostDelete }: Props) {
4747

4848
return (
4949
<CardCommon width={POST_WIDTH}>
50-
<Row alignItems='center' marginBottom={10}>
50+
<Row alignItems='center'>
5151
<ProfileSet profileImage={targetUser!.profileImage} username={targetUser!.username!} />
5252
<TimeFromNow time={createdAt!} />
5353
<Spacer />

โ€Žfrontend/src/components/PostDetail/style.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import styled from '@emotion/styled';
22

3-
import PostComments from 'src/components/PostComments';
4-
53
import { POST_WIDTH } from 'src/globals/constants';
64

75
import { ThemeType } from 'src/types';

โ€Žfrontend/src/components/cards/DashboardBasicCard/index.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
USER_INFO_PROFILE_IMAGE_MARGIN_RIGHT,
2020
DASHBOARD_LEFT_SECTION_CARD_WIDTH,
2121
DASHBOARD_USER_INFO_ICON_SIZE,
22-
DASHBOARD_USER_INFO_COL_MARGIN,
2322
} from 'src/globals/constants';
2423

2524
import dashboardUserInfoAtom from 'src/recoil/dashboardUserInfo';
@@ -49,14 +48,14 @@ function DashboardBasicCard() {
4948
<Col>
5049
<Row alignItems='center'>
5150
<IoPersonOutline size={DASHBOARD_USER_INFO_ICON_SIZE} />
52-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
51+
<Col>
5352
<Content>์ด๋ฆ„</Content>
5453
<Content>{name}</Content>
5554
</Col>
5655
</Row>
5756
<Row alignItems='center'>
5857
<IoCallOutline size={DASHBOARD_USER_INFO_ICON_SIZE} />
59-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
58+
<Col>
6059
<Content>์—ฐ๋ฝ์ฒ˜</Content>
6160
<Content>{phoneNumber}</Content>
6261
</Col>
@@ -65,14 +64,14 @@ function DashboardBasicCard() {
6564
<Col>
6665
<Row alignItems='center'>
6766
<IoCalendarClearOutline size={DASHBOARD_USER_INFO_ICON_SIZE} />
68-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
67+
<Col>
6968
<Content>์ƒ๋…„ ์›”์ผ</Content>
7069
<Content>{getBirthdayFormat(birthday)}</Content>
7170
</Col>
7271
</Row>
7372
<Row alignItems='center'>
7473
<IoMailOutline size={DASHBOARD_USER_INFO_ICON_SIZE} />
75-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
74+
<Col>
7675
<Content>์ด๋ฉ”์ผ</Content>
7776
<Content>{email}</Content>
7877
</Col>
@@ -81,14 +80,14 @@ function DashboardBasicCard() {
8180
<Col>
8281
<Row alignItems='center'>
8382
<IoLocationOutline size={DASHBOARD_USER_INFO_ICON_SIZE} />
84-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
83+
<Col>
8584
<Content>์ฃผ์†Œ์ง€</Content>
8685
<Content>{region}</Content>
8786
</Col>
8887
</Row>
8988
<Row alignItems='center'>
9089
<BsPencil size={DASHBOARD_USER_INFO_ICON_SIZE} />
91-
<Col margin={DASHBOARD_USER_INFO_COL_MARGIN}>
90+
<Col>
9291
<Content>ํ•™๋ ฅ</Content>
9392
<Content>{school}</Content>
9493
</Col>

โ€Žfrontend/src/components/cards/DashboardLinkCard/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import CardCommon from 'src/components/cards/Common';
55
import DashboardLinkSettingButton from 'src/components/buttons/dashboardSettings/DashboardLinkSettingButton';
66
import { Row, Col } from 'src/components/Grid';
77

8-
import {
9-
DASHBOARD_RIGHT_SECTION_CARD_WIDTH,
10-
DASHBOARD_LINK_ROW_PADDING,
11-
} from 'src/globals/constants';
8+
import { DASHBOARD_RIGHT_SECTION_CARD_WIDTH } from 'src/globals/constants';
129

1310
import userAtom from 'src/recoil/user';
1411
import dashboardUserInfoAtom from 'src/recoil/dashboardUserInfo';
@@ -25,7 +22,7 @@ function DashboardLinkCard() {
2522

2623
return (
2724
<CardCommon width={DASHBOARD_RIGHT_SECTION_CARD_WIDTH}>
28-
<Row padding={DASHBOARD_LINK_ROW_PADDING} justifyContent='space-between'>
25+
<Row justifyContent='space-between'>
2926
<Col>
3027
<Row>
3128
<Title>ํฌ๋ง ์ง๊ตฐ</Title>

โ€Žfrontend/src/components/cards/DashboardTechStacksCard/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import CardCommon from 'src/components/cards/Common';
44
import DashboardTechStacksSettingButton from 'src/components/buttons/dashboardSettings/DashboardTechStacksSettingButton';
55
import { Col, Row } from 'src/components/Grid';
66

7-
import {
8-
DASHBOARD_LEFT_SECTION_CARD_WIDTH,
9-
DASHBOARD_STACK_GRID_PADDING,
10-
} from 'src/globals/constants';
7+
import { DASHBOARD_LEFT_SECTION_CARD_WIDTH } from 'src/globals/constants';
118

129
import { dashboardTechStacksSelector } from 'src/recoil/dashboardUserInfo';
1310

@@ -20,7 +17,7 @@ function DashboardTechStacksCard() {
2017
return (
2118
<CardCommon width={DASHBOARD_LEFT_SECTION_CARD_WIDTH}>
2219
<Row justifyContent='space-between'>
23-
<Col padding={DASHBOARD_STACK_GRID_PADDING}>
20+
<Col>
2421
{fields.map((field) => (
2522
<Field key={field}>
2623
<Title>{field}</Title>

โ€Žfrontend/src/components/contents/ProblemContent/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function ProblemContent({ content, info, link, title }: Props) {
1818
<>
1919
<h1>{title}</h1>
2020
<Row justifyContent='space-between'>
21-
<p>ํ‹ฐ์–ด {info.tear}</p>
22-
<p>ํ‘ผ ์‚ฌ๋žŒ {info.solvedUserCount}</p>
23-
<p>์‹œ๋„ ํšŸ์ˆ˜ {info.totalTryCount}</p>
21+
<p>ํ‹ฐ์–ด {info?.tear}</p>
22+
<p>ํ‘ผ ์‚ฌ๋žŒ {info?.solvedUserCount}</p>
23+
<p>์‹œ๋„ ํšŸ์ˆ˜ {info?.totalTryCount}</p>
2424
</Row>
2525
{/* eslint-disable-next-line react/no-danger */}
2626
<div dangerouslySetInnerHTML={{ __html: sanitizer(content) }} />

โ€Žfrontend/src/components/contents/RepoContent/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ function RepoContent({ content, link, info, title }: Props) {
1818
<>
1919
<h1>{title}</h1>
2020
<Row justifyContent='space-between'>
21-
<p>๋ณ„ {info.starCount}</p>
22-
<p>ํฌํฌ {info.forkCount}</p>
23-
{Object.keys(info.language ?? {}).map((language) => (
21+
<p>๋ณ„ {info?.starCount}</p>
22+
<p>ํฌํฌ {info?.forkCount}</p>
23+
{Object.keys(info?.language ?? {}).map((language) => (
2424
<Col key={language}>
2525
<p>{language}</p>
26-
<p>{info.language[language]}%</p>
26+
<p>{info?.language[language]}%</p>
2727
</Col>
2828
))}
2929
</Row>

โ€Žfrontend/src/components/modals/BlogsModal/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import { Col } from 'src/components/Grid';
1010

1111
import { Fetcher } from 'src/utils';
1212

13-
import { EXTERNAL_MODAL_HEIGHT } from 'src/globals/constants';
14-
1513
import { BlogType } from 'src/types';
1614

1715
import userAtom from 'src/recoil/user';
@@ -49,7 +47,6 @@ function BlogsModal({ onClose, onSelect }: Props) {
4947
onClose={onClose}
5048
close='์ทจ์†Œ'
5149
confirm='์„ ํƒ'
52-
height={EXTERNAL_MODAL_HEIGHT}
5350
onConfirm={handleConfirm}
5451
disabled={selectedIndex === -1}
5552
title={hasExternalBlog ? '๊ฒŒ์‹œ๊ธ€์„ ์„ ํƒํ•˜์„ธ์š”' : '์—ฐ๋™๋œ ๋ธ”๋กœ๊ทธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค'}

โ€Žfrontend/src/components/modals/BlogsModal/style.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const Wrapper = styled.div`
66
`;
77

88
const Blogs = styled.div`
9-
height: 200px;
9+
height: 400px;
10+
width: 350px;
1011
overflow-y: scroll;
1112
padding: 16px;
1213
`;

โ€Žfrontend/src/components/modals/PostWriteModal/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ function PostWriteModal({ onClose, onPostWrite }: Props) {
4444
});
4545
const problemMutation = useMutation((id: string) => Fetcher.getProblem(id), {
4646
onSuccess: (problem: ExternalType) => {
47-
setExternal(problem);
4847
setExternalType('problem');
48+
setExternal(problem);
4949
},
5050
});
5151
const repoMutation = useMutation((name: string) => Fetcher.getUserRepo(user, name), {
5252
onSuccess: (repo: ExternalType) => {
53-
setExternal(repo);
5453
setExternalType('repo');
54+
setExternal(repo);
5555
},
5656
});
5757
const blogMutation = useMutation(
5858
(blog: BlogType) => Fetcher.getUserBlog(user, blog.identity, blog.postID),
5959
{
6060
onSuccess: (blog: ExternalType) => {
61-
setExternal(blog);
6261
setExternalType('blog');
62+
setExternal(blog);
6363
},
6464
},
6565
);
@@ -129,7 +129,7 @@ function PostWriteModal({ onClose, onPostWrite }: Props) {
129129
onClose={onClose}
130130
disabled={content.trim() === ''}
131131
>
132-
<Row justifyContent='center' alignItems='center' margin={16}>
132+
<Row justifyContent='center' alignItems='center'>
133133
<ImageInput onImageUpload={handleImageUpload}>
134134
<IconHolder>
135135
<IoMdImages />
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import styled from '@emotion/styled';
22

33
const Textarea = styled.textarea`
4-
width: 100%;
4+
width: 360px;
55
height: 164px;
6-
border: none;
76
border-radius: 36px;
87
padding: 24px;
9-
margin-bottom: 36px;
10-
background: #1e1e1e;
11-
box-shadow: inset 5px 5px 11px #1a1a1a, inset -5px -5px 11px #232323;
8+
margin: 24px 0;
9+
background: #444444;
10+
box-shadow: inset 5px 5px 10px #3a3a3a, inset -5px -5px 10px #4e4e4e;
1211
resize: none;
1312
font-size: 16px;
1413
`;
@@ -17,13 +16,13 @@ const IconHolder = styled.div`
1716
display: flex;
1817
align-items: center;
1918
justify-content: center;
20-
align-self: start;
19+
align-self: center;
2120
width: 48px;
2221
height: 48px;
2322
border-radius: 12px;
2423
background: #444444;
25-
box-shadow: 11px 11px 21px #3a3a3a, -11px -11px 21px #4e4e4e;
26-
margin-right: 12px;
24+
box-shadow: 4px 4px 8px #3a3a3a, -4px -4px 8px #4e4e4e;
25+
margin: 0 12px;
2726
`;
2827

2928
export { Textarea, IconHolder };

โ€Žfrontend/src/components/modals/ProblemsModal/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { Col, Row } from 'src/components/Grid';
99

1010
import { Fetcher } from 'src/utils';
1111

12-
import { EXTERNAL_MODAL_HEIGHT } from 'src/globals/constants';
13-
1412
import { ProblemType } from 'src/types';
1513

1614
import { Wrapper, Problems } from './style';
@@ -47,7 +45,6 @@ function ProblemsModal({ onClose, onSelect }: Props) {
4745
onClose={onClose}
4846
close='์ทจ์†Œ'
4947
confirm='์„ ํƒ'
50-
height={EXTERNAL_MODAL_HEIGHT}
5148
onConfirm={handleConfirm}
5249
disabled={selectedIndex === -1}
5350
title='๋ฌธ์ œ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ณ  ์„ ํƒํ•˜์„ธ์š”'

โ€Žfrontend/src/components/modals/ProblemsModal/style.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const Wrapper = styled.div`
66
`;
77

88
const Problems = styled.div`
9-
height: 200px;
9+
height: 400px;
10+
width: 350px;
1011
overflow-y: scroll;
1112
padding: 16px;
1213
`;

โ€Žfrontend/src/components/modals/ReposModal/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import userAtom from 'src/recoil/user';
1212

1313
import { Fetcher } from 'src/utils';
1414

15-
import { REPOS_MODAL_HEIGHT } from 'src/globals/constants';
16-
1715
import { RepoType } from 'src/types';
1816

1917
import { Wrapper, Repos } from './style';
@@ -48,7 +46,6 @@ function ReposModal({ onClose, onSelect }: Props) {
4846
onConfirm={handleConfirm}
4947
close='์ทจ์†Œ'
5048
confirm='์„ ํƒ'
51-
height={REPOS_MODAL_HEIGHT}
5249
onClose={onClose}
5350
disabled={selectedIndex === -1}
5451
title={hasExternalGithub ? '์ €์žฅ์†Œ๋ฅผ ์„ ํƒํ•˜์„ธ์š”' : '์—ฐ๋™๋œ ๊นƒํ—™์ด ์—†์Šต๋‹ˆ๋‹ค'}

โ€Žfrontend/src/components/modals/ReposModal/style.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ const Wrapper = styled.div`
66
`;
77

88
const Repos = styled.div`
9-
overflow-y: scroll;
109
height: 400px;
10+
width: 350px;
11+
overflow-y: scroll;
1112
`;
1213

1314
export { Wrapper, Repos };

0 commit comments

Comments
ย (0)