Skip to content

Commit ceb3763

Browse files
committed
refactor: 기본 컬럼 문자열에 인터뷰 컬럼을 조건부로 추가하는 방식으로 리팩토링
1 parent cde31bc commit ceb3763

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/pages/admin/Dashboard/components/ApplicantListSection/List/ApplicantList/index.styled.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const Container = styled.div({
77
export const ApplicantInfoCategoryList = styled.div<{ hasInterview: boolean }>`
88
display: grid;
99
grid-template-columns: ${({ hasInterview }) =>
10-
hasInterview ? '1fr 1fr 1fr 1.2fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1fr 1.2fr 1.5fr 1fr'};
10+
'1fr 1fr 1fr 1.2fr 1.5fr 1fr' + (hasInterview ? '1.2fr' : '')};
1111
background-color: #f9fbfc;
1212
border-bottom: 1.8px solid ${({ theme }) => theme.colors.gray100};
1313
padding: 1.7rem 0 1.5rem 0;
@@ -18,7 +18,7 @@ export const ApplicantInfoCategoryList = styled.div<{ hasInterview: boolean }>`
1818
1919
@media (max-width: 1200px) {
2020
grid-template-columns: ${({ hasInterview }) =>
21-
hasInterview ? '1fr 1fr 1fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1fr 1.5fr 1fr'};
21+
'1fr 1fr 1fr 1.5fr 1fr' + (hasInterview ? '1.2fr' : '')};
2222
2323
& > div:nth-of-type(4) {
2424
display: none;
@@ -27,16 +27,15 @@ export const ApplicantInfoCategoryList = styled.div<{ hasInterview: boolean }>`
2727
2828
@media (max-width: ${({ theme }) => theme.breakpoints.web}) {
2929
grid-template-columns: ${({ hasInterview }) =>
30-
hasInterview ? '1fr 1fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1.5fr 1fr'};
30+
'1fr 1fr 1.5fr 1fr' + (hasInterview ? '1.2fr' : '')}
3131
3232
& > div:nth-of-type(3) {
3333
display: none;
3434
}
3535
}
3636
3737
@media (max-width: 768px) {
38-
grid-template-columns: ${({ hasInterview }) =>
39-
hasInterview ? '1fr 1.5fr 1fr 1.2fr' : '1fr 1.5fr 1fr'};
38+
grid-template-columns: ${({ hasInterview }) => '1fr 1.5fr 1fr' + (hasInterview ? '1.2fr' : '')};
4039
4140
& > div:nth-of-type(2) {
4241
display: none;

src/pages/admin/Dashboard/components/ApplicantListSection/List/ApplicantListItem/index.styled.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { ApplicantData } from '@/pages/admin/Dashboard/types/dashboard';
44
export const ItemWrapper = styled.div<{ hasInterview: boolean }>`
55
display: grid;
66
grid-template-columns: ${({ hasInterview }) =>
7-
hasInterview ? '1fr 1fr 1fr 1.2fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1fr 1.2fr 1.5fr 1fr'};
7+
'1fr 1fr 1fr 1.2fr 1.5fr 1fr' + (hasInterview ? ' 1.2fr' : '')};
88
gap: 1rem;
99
align-items: center;
1010
padding: 1.5rem 0;
@@ -21,7 +21,7 @@ export const ItemWrapper = styled.div<{ hasInterview: boolean }>`
2121
2222
@media (max-width: 1200px) {
2323
grid-template-columns: ${({ hasInterview }) =>
24-
hasInterview ? '1fr 1fr 1fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1fr 1.5fr 1fr'};
24+
'1fr 1fr 1fr 1.5fr 1fr' + (hasInterview ? ' 1.2fr' : '')};
2525
2626
& > p:nth-of-type(4) {
2727
display: none;
@@ -30,7 +30,7 @@ export const ItemWrapper = styled.div<{ hasInterview: boolean }>`
3030
3131
@media (max-width: ${({ theme }) => theme.breakpoints.web}) {
3232
grid-template-columns: ${({ hasInterview }) =>
33-
hasInterview ? '1fr 1fr 1.5fr 1fr 1.2fr' : '1fr 1fr 1.5fr 1fr'};
33+
'1fr 1fr 1.5fr 1fr' + (hasInterview ? ' 1.2fr' : '')};
3434
3535
& > p:nth-of-type(3) {
3636
display: none;
@@ -39,7 +39,7 @@ export const ItemWrapper = styled.div<{ hasInterview: boolean }>`
3939
4040
@media (max-width: 768px) {
4141
grid-template-columns: ${({ hasInterview }) =>
42-
hasInterview ? '1fr 1.5fr 1fr 1.2fr' : '1fr 1.5fr 1fr'};
42+
'1fr 1.5fr 1fr' + (hasInterview ? ' 1.2fr' : '')};
4343
4444
& > p:nth-of-type(2) {
4545
display: none;

0 commit comments

Comments
 (0)