diff --git a/src/app/timer/page.tsx b/src/app/timer/page.tsx index dc114749..cd14a574 100644 --- a/src/app/timer/page.tsx +++ b/src/app/timer/page.tsx @@ -1,12 +1,12 @@ 'use client'; import TimerView from '@/app/timer/TimerView'; -import useStep from '@/app/timer/useStep'; import useTimer from '@/app/timer/useTimer'; +import useTimerStatus from '@/app/timer/useTimerStatus'; import Header from '@/components/Layout/Header'; import { css } from '@styled-system/css'; export default function TimerPage() { - const { step, stepLabel, onNextStep } = useStep(); + const { step, stepLabel, onNextStep } = useTimerStatus(); const { formattedTime } = useTimer(step); const onFinish = () => { diff --git a/src/app/timer/useTimer.ts b/src/app/timer/useTimer.ts index deac5a76..31018aa2 100644 --- a/src/app/timer/useTimer.ts +++ b/src/app/timer/useTimer.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { type StepType } from '@/app/timer/useStep'; +import { type StepType } from '@/app/timer/useTimerStatus'; export default function useTimer(status: StepType, initSeconds = 600) { const [second, setSecond] = useState(initSeconds); // 남은 시간 (단위: 초) diff --git a/src/app/timer/useStep.ts b/src/app/timer/useTimerStatus.ts similarity index 83% rename from src/app/timer/useStep.ts rename to src/app/timer/useTimerStatus.ts index 6c635d7c..73dc7964 100644 --- a/src/app/timer/useStep.ts +++ b/src/app/timer/useTimerStatus.ts @@ -2,7 +2,7 @@ import { useState } from 'react'; export type StepType = 'ready' | 'progress' | 'stop'; -const STEP_LABEL = { +const TIMER_STATUS = { ready: { title: '준비 되셨나요?', desc: '타이머를 눌러서 10분의 미션을 완성해 주세요!', @@ -17,10 +17,10 @@ const STEP_LABEL = { }, } as const; -function useStep() { +function useTimerStatus() { const [step, setStep] = useState('ready'); - const stepLabel = STEP_LABEL[step]; + const stepLabel = TIMER_STATUS[step]; const onNextStep = (nextStep: StepType) => { setStep(nextStep); @@ -29,4 +29,4 @@ function useStep() { return { step, onNextStep, stepLabel }; } -export default useStep; +export default useTimerStatus;