Skip to content

Commit f509f77

Browse files
committed
fix: 지원마감 버튼 -> 애니메이션 버튼으로 변경
1 parent 66964cf commit f509f77

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

components/recruit/RecruitBanner/index.tsx

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AnimatedButton, Button } from 'components/common';
22
import Breakpoints from 'constants/breakpoints';
3+
import Path from 'constants/path';
34
import Yapp from 'constants/yapp';
45
import {
56
IS_RECRUITING,
@@ -8,12 +9,15 @@ import {
89
RECRUIT_BANNER_ACTIVE,
910
} from 'database/recruit';
1011
import DOMPurify from 'isomorphic-dompurify';
12+
import { useRouter } from 'next/router';
1113
import styled from 'styled-components';
1214
import media from 'styles/media';
1315

1416
function RecruitBanner() {
1517
const BannerInfo = IS_RECRUITING ? RECRUIT_BANNER_ACTIVE : RECRUIT_BANNER;
16-
const { title, description } = BannerInfo;
18+
const { title, description, buttonName } = BannerInfo;
19+
const buttonParams = IS_RECRUITING ? { width: 168 } : { width: 190 };
20+
const router = useRouter();
1721

1822
return (
1923
<RecruitBannerContainer>
@@ -31,15 +35,34 @@ function RecruitBanner() {
3135
}
3236
rel="noreferrer"
3337
>
34-
<ApplyButton
35-
width={220}
36-
height={65}
37-
fontColor="white"
38-
buttonColor="grey_850"
39-
borderColor="lightGrey"
40-
>
41-
{IS_RECRUITING ? '모든 공고 보기' : '지원마감'}
42-
</ApplyButton>
38+
{IS_RECRUITING ? (
39+
<ApplyButton
40+
width={220}
41+
height={65}
42+
fontColor="white"
43+
buttonColor="grey_850"
44+
borderColor="lightGrey"
45+
>
46+
{'모든 공고 보기'}
47+
</ApplyButton>
48+
) : (
49+
<AnimatedButton
50+
height={65}
51+
fontColor="white"
52+
buttonColor="grey_850"
53+
className="recruitButton"
54+
buttonText={buttonName}
55+
onClick={() => {
56+
if (!IS_RECRUITING) {
57+
window.location.href = NEXT_GENERATION_RECRUIT_LINK;
58+
return;
59+
}
60+
61+
router.push(Path.Recruit);
62+
}}
63+
{...buttonParams}
64+
/>
65+
)}
4366
</ButtonBlock>
4467
</BannerInner>
4568
</RecruitBannerContainer>

0 commit comments

Comments
 (0)