diff --git a/frontend/src/components/InterviewCreatorForm/InterviewCreateForm.tsx b/frontend/src/components/InterviewCreatorForm/InterviewCreateForm.tsx index 8f66ce5..96355da 100644 --- a/frontend/src/components/InterviewCreatorForm/InterviewCreateForm.tsx +++ b/frontend/src/components/InterviewCreatorForm/InterviewCreateForm.tsx @@ -2,7 +2,6 @@ import {Button, ModalBody, ModalContent, ModalHeader, Slider} from "@nextui-org/ import {problemCount, tailQuestionCount} from "@/components/InterviewCreatorForm/InterviewCreateForm.constant"; import {InterviewSettings} from "@/types/interview"; import {useInterviewCreateMutation} from "@/hooks/api/interview/useInterviewCreateMutation"; -import {useCallback} from "react"; import {useInterviewCreateForm} from "@/components/InterviewCreatorForm/useInterviewCreateForm"; @@ -46,13 +45,9 @@ interface InterviewCreateFormProps { } const InterviewCreateForm = ({ interviewSettings: {questionSetId, count, tailQuestionDepth}}: InterviewCreateFormProps) => { - const {mutate} = useInterviewCreateMutation(); + const {mutate, isPending,isSuccess} = useInterviewCreateMutation(); const {interviewCreateForm, handleOnChange} = useInterviewCreateForm({tailQuestionDepth, totalProblemCount:count}) - const handleInterviewCreate = useCallback(() => { - mutate({questionSetId, ...interviewCreateForm}); - }, [interviewCreateForm]); - return ( {() => ( @@ -78,7 +73,9 @@ const InterviewCreateForm = ({ interviewSettings: {questionSetId, count, tailQue

*아직 지원하지 않습니다.

- + )} diff --git a/frontend/src/hooks/api/interview/useInterviewCreateMutation.ts b/frontend/src/hooks/api/interview/useInterviewCreateMutation.ts index ff89567..bebdcfc 100644 --- a/frontend/src/hooks/api/interview/useInterviewCreateMutation.ts +++ b/frontend/src/hooks/api/interview/useInterviewCreateMutation.ts @@ -5,6 +5,7 @@ import {PATH} from "@/constants/path"; import {toast} from "sonner"; + export const useInterviewCreateMutation = () => { const navigate = useNavigate(); return useMutation({ @@ -14,9 +15,7 @@ export const useInterviewCreateMutation = () => { navigate(PATH.INTERVIEW(interviewId)); }, onError:(error) => { - console.log(error.message); toast.error(error.message) } - }) } diff --git a/frontend/src/pages/MainPage.tsx b/frontend/src/pages/MainPage.tsx index 3a99e9d..56ca22e 100644 --- a/frontend/src/pages/MainPage.tsx +++ b/frontend/src/pages/MainPage.tsx @@ -42,8 +42,8 @@ export default function(){ {isLoading ? : <>}
- - + + )