Skip to content

Commit

Permalink
refactor: Timer => SocketTimer로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
mahwin committed Nov 29, 2023
1 parent 4470787 commit 6294ffc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Props {
onTimeout?: () => void;
}

export default function Timer(props: Props) {
export default function SocketTimer(props: Props) {
let { socket, endsAt, isConnected, onTimeout } = props;
// api 연결이 X endsAt 대신 임시로 만들어놓은 것.
// min 1 => 60초 동안 돌아갑니다. 변경해서 쓰세요 일단은..
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/ContestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Editor from '@/components/Editor/Editor';
import ProblemViewer from '@/components/Problem/ProblemViewer';
import { SimulationInputModal } from '@/components/Simulation/SimulationInputModal';
import { SimulationResultList } from '@/components/Simulation/SimulationResultList';
import SocketTimer from '@/components/SocketTimer';
import { SubmissionResult } from '@/components/Submission';
import Timer from '@/components/Timer';
import { SITE } from '@/constants';
import type { SubmissionForm } from '@/hooks/competition';
import { useCompetition } from '@/hooks/competition';
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function ContestPage() {
<CompetitionHeader crumbs={crumbs} id={competitionId} />
<section className={rowStyle}>
<span className={problemTitleStyle}>{problem.title}</span>
<Timer
<SocketTimer
socket={socket.current}
isConnected={isConnected}
endsAt={new Date(endsAt)}
Expand Down

0 comments on commit 6294ffc

Please sign in to comment.