diff --git a/src/apis/auth/createGuestUserApi.ts b/src/apis/auth/createGuestUserApi.ts deleted file mode 100644 index bb76259..0000000 --- a/src/apis/auth/createGuestUserApi.ts +++ /dev/null @@ -1,6 +0,0 @@ -import apiClient from '@/apis'; -import type { User } from '@/types/user'; - -export default async function createGuestUserApi(user: User) { - return (await apiClient.post(`/onboarding/members`, user)).data; //이거 안쓰는 거 같은데 -} diff --git a/src/apis/auth/index.ts b/src/apis/auth/index.ts index cbb83a5..a2739f5 100644 --- a/src/apis/auth/index.ts +++ b/src/apis/auth/index.ts @@ -1,2 +1 @@ -export { default as createGuestUserApi } from './createGuestUserApi'; export { default as verifyStudentApi } from './verifyStudentApi'; diff --git a/src/hooks/mutation/index.ts b/src/hooks/mutation/index.ts index c2ad9ab..fdbeeaa 100644 --- a/src/hooks/mutation/index.ts +++ b/src/hooks/mutation/index.ts @@ -1,2 +1 @@ -export { default as useCreateGuestUser } from './useCreateGuestUser'; export { default as useSendStudentEmail } from './useSendStudentEmail'; diff --git a/src/hooks/mutation/useCreateGuestUser.ts b/src/hooks/mutation/useCreateGuestUser.ts deleted file mode 100644 index 54a3182..0000000 --- a/src/hooks/mutation/useCreateGuestUser.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { createGuestUserApi } from '@/apis/auth'; -import LandingStatus from '@/constants/landingStatus'; -import useLandingStatus from '@/hooks/zustand/useLandingStatus'; -import RoutePath from '@/routes/routePath'; -import { useMutation } from '@tanstack/react-query'; -import { useNavigate } from 'react-router-dom'; - -export default function useCreateGuestUser() { - const navigation = useNavigate(); - const { updateLandingStatue } = useLandingStatus(); - const { mutate: createGuestUser, ...rest } = useMutation({ - mutationFn: createGuestUserApi, - onSuccess: () => { - updateLandingStatue(LandingStatus.Dashboard); - navigation(RoutePath.Dashboard, { replace: true }); - } - }); - - return { createGuestUser, ...rest }; -}