diff --git a/server/build.gradle b/server/build.gradle index d590fc8..40a0d47 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -102,6 +102,6 @@ tasks.register('copyDocument', Copy) { into file("src/main/resources/static/docs") } -build { +bootJar { dependsOn copyDocument } diff --git a/web/src/components/exams/ExamSummaryCard.tsx b/web/src/components/exams/ExamSummaryCard.tsx index cc37ac1..638972f 100644 --- a/web/src/components/exams/ExamSummaryCard.tsx +++ b/web/src/components/exams/ExamSummaryCard.tsx @@ -1,9 +1,7 @@ import { ExamSummaryResponse } from '@/api/examAPI'; import { Routes } from '@/constants'; -import useUser from '@/hooks/useUser'; import { fromNowDate } from '@/lib/date.ts'; import { Button, Card, CardFooter, CardHeader, Chip, Divider, Image } from '@nextui-org/react'; -import toast from 'react-hot-toast'; import { useNavigate } from 'react-router'; import BaseCardBody from '../common/BaseCardBody'; @@ -12,14 +10,8 @@ interface ExamSummaryCardProps { } const ExamSummaryCard = ({ exam }: ExamSummaryCardProps) => { - const user = useUser(); const navigate = useNavigate(); const handleExamStart = () => { - if (!user) { - toast.error('로그인이 필요합니다.'); - return; - } - navigate(Routes.exam.intro(exam.id)); }; diff --git a/web/src/pages/exams/ExamIntroPage.tsx b/web/src/pages/exams/ExamIntroPage.tsx index 756a991..41ad6a6 100644 --- a/web/src/pages/exams/ExamIntroPage.tsx +++ b/web/src/pages/exams/ExamIntroPage.tsx @@ -1,8 +1,10 @@ import AsyncBoundary from '@/components/AsyncBoundary'; import { Routes } from '@/constants'; import useGetExam from '@/hooks/api/exam/useGetExam'; +import useUser from '@/hooks/useUser'; import { fullDate } from '@/lib/date.ts'; import { Button, Divider } from '@nextui-org/react'; +import toast from 'react-hot-toast'; import { useNavigate, useParams } from 'react-router'; const ExamIntroPage = () => { @@ -21,10 +23,15 @@ const ExamIntroPage = () => { }; const ExamProgressContent = ({ examId }: { examId: number }) => { + const user = useUser(); const { data } = useGetExam(examId); const navigate = useNavigate(); const handleExamStart = () => { + if (!user) { + toast.error('로그인이 필요합니다.'); + return; + } navigate(Routes.exam.progress(examId)); };