Skip to content

Commit

Permalink
refactor: 지원하기 버튼 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonju0110 committed Apr 23, 2024
1 parent 5512622 commit ef3c3a8
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { AnchorHTMLAttributes, useEffect, useState } from 'react'

import { RecruitDate, RecruitStatus, RecruitStatusEnum } from '@/constants'

import * as css from './button.module.scss'
import * as css from './apply-button.module.scss'

interface Props extends AnchorHTMLAttributes<HTMLAnchorElement> {
availableDisabled?: boolean
}

export const Button = ({ className, availableDisabled = false, children, ...props }: Props) => {
export const ApplyButton = ({ className, availableDisabled = false, children, ...props }: Props) => {
const [recruitStatus, setRecruitStatus] = useState<RecruitStatusEnum>(RecruitStatusEnum.BEFORE_RECRUITING)

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions src/components/apply-button/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './apply-button'
1 change: 0 additions & 1 deletion src/components/button/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './apply-button'
export * from './aura-circle'
export * from './button'
export * from './floating-button'
export * from './glass-card'
export * from './section'
Expand Down
6 changes: 3 additions & 3 deletions src/layouts/components/header/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { clsx } from 'clsx'
import { Link, withPrefix } from 'gatsby'
import ReactModal from 'react-modal'

import { Button } from '@/components'
import { ApplyButton } from '@/components'

import { Links } from '../../constant'
import * as css from './modal.module.scss'
Expand All @@ -26,9 +26,9 @@ export const Modal = ({ isOpen, pathname, closeModal }: ModalProps) => {
{link.name}
</Link>
))}
<Button availableDisabled className={css.apply_button} onClick={closeModal}>
<ApplyButton availableDisabled className={css.apply_button} onClick={closeModal}>
지원하기
</Button>
</ApplyButton>
</ReactModal>
)
}
6 changes: 3 additions & 3 deletions src/layouts/components/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from 'clsx'
import { Link, withPrefix } from 'gatsby'
import { StaticImage } from 'gatsby-plugin-image'

import { Button } from '@/components'
import { ApplyButton } from '@/components'

import { Modal } from './components'
import { Links } from './constant'
Expand Down Expand Up @@ -34,9 +34,9 @@ export const Header = ({ pathname }: Props) => {
{link.name}
</Link>
))}
<Button availableDisabled className={css.apply_button}>
<ApplyButton availableDisabled className={css.apply_button}>
지원하기
</Button>
</ApplyButton>
</nav>
<button type="button" onClick={toggleModal} className={css.menu_button}>
<Hamburger />
Expand Down
6 changes: 3 additions & 3 deletions src/views/about/components/apply-section/apply-section.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Button, Section } from '@/components'
import { ApplyButton, Section } from '@/components'

import * as css from './apply-section.module.scss'

export const ApplySection = () => {
return (
<Section>
<Section.Head title="CMC와 함께 도전하세요" />
<Button availableDisabled className={css.button}>
<ApplyButton availableDisabled className={css.button}>
CMC 15기 지원하기
<div className={css.button_effect} />
</Button>
</ApplyButton>
</Section>
)
}
4 changes: 2 additions & 2 deletions src/views/home/components/countdown-timer/countdown-timer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import clsx from 'clsx'
import { useCallback, useEffect, useState } from 'react'

import { Button } from '@/components'
import { ApplyButton } from '@/components'
import { RecruitDate, RecruitStatus, RecruitStatusEnum } from '@/constants'

import * as css from './countdown-timer.module.scss'
Expand Down Expand Up @@ -68,7 +68,7 @@ export const CountdownTimer = () => {
>
{`${formatTime(timeLeft.hours)} : ${formatTime(timeLeft.minutes)} : ${formatTime(timeLeft.seconds)}`}
</p>
<Button href={RecruitStatus[recruitStatus].link}>{RecruitStatus[recruitStatus].buttonText}</Button>
<ApplyButton href={RecruitStatus[recruitStatus].link}>{RecruitStatus[recruitStatus].buttonText}</ApplyButton>
</div>
)
}
6 changes: 3 additions & 3 deletions src/views/recruit/components/plan-card/plan-card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, GlassCard } from '@/components'
import { ApplyButton, GlassCard } from '@/components'

import { LightEffect } from '../light-effect'
import * as css from './plan-card.module.scss'
Expand Down Expand Up @@ -33,9 +33,9 @@ export const PlanCard = ({ title, plans, showButton = false }: RenderCardProps)
<ul>{renderPlans(plans)}</ul>
<LightEffect />
{showButton && (
<Button availableDisabled className={css.card_button}>
<ApplyButton availableDisabled className={css.card_button}>
CMC 15기 지원하러 가기
</Button>
</ApplyButton>
)}
</GlassCard>
)
Expand Down

0 comments on commit ef3c3a8

Please sign in to comment.