diff --git a/src/app/mypage/leave/components/LeaveForm.tsx b/src/app/mypage/leave/components/LeaveForm.tsx index 02f701f..2c1fe04 100644 --- a/src/app/mypage/leave/components/LeaveForm.tsx +++ b/src/app/mypage/leave/components/LeaveForm.tsx @@ -5,7 +5,7 @@ import Button from '@/components/Button' import { useEffect, useState } from 'react' import Select from '@/components/Select' import { withdraw } from '@/lib' -import { useRouter } from 'next/navigation' +import { signOut } from 'next-auth/react' import LeaveConfirmModal from './LeaveConfirmModal' const WITHDRAW_TYPE = { @@ -26,8 +26,6 @@ const LeaveForm = () => { customReason.length > 50 ? '50자까지 입력 가능합니다.' : '' const isCustomReasonValid = customReason && !errorMessage - const router = useRouter() - useEffect(() => { if (withdrawType === WITHDRAW_TYPE.SELECT) { setIsFormValid(false) @@ -48,13 +46,11 @@ const LeaveForm = () => { reason: customReason, }) - // TODO: 탈퇴 후 로직 - setIsLeaveConfirmModalOpen(true) } const onCloseLeaveConfirmModal = () => { - router.back() + signOut({ callbackUrl: '/' }) } return (