diff --git a/src/app/auth/callback/page.tsx b/src/app/auth/callback/page.tsx index fb5137c..1cf36de 100644 --- a/src/app/auth/callback/page.tsx +++ b/src/app/auth/callback/page.tsx @@ -43,6 +43,7 @@ function LoginCheck() { const data = await res.json() Cookies.set('accessToken', data.data.accessToken) + Cookies.set('role', data.data.userInfo.role) setUserInfo({ ...data.data.userInfo, profileImage: diff --git a/src/app/home/components/TimeCard.tsx b/src/app/home/components/TimeCard.tsx index 2cbbcc8..1750037 100644 --- a/src/app/home/components/TimeCard.tsx +++ b/src/app/home/components/TimeCard.tsx @@ -1,5 +1,5 @@ import { categoryLabels } from '@/app/archive/api/types' -import { Badge, Cup, Div } from '@/components' +import { Badge, Div } from '@/components' import Image from 'next/image' interface TimeCardProps { diff --git a/src/app/page.tsx b/src/app/page.tsx index 589e28d..69cb02e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -12,7 +12,6 @@ export default function Home() { const [logoColor, setlogoColor] = useState('white') useEffect(() => { - const timer = setTimeout(() => { setIsSplash(false) }, 1200) diff --git a/src/app/start/api/api.ts b/src/app/start/api/api.ts index f4950ed..07e6c9a 100644 --- a/src/app/start/api/api.ts +++ b/src/app/start/api/api.ts @@ -1,3 +1,4 @@ +import Cookies from 'js-cookie' import { http } from '@/api' import useUserInfo, { UserInfo } from '@/store/useUserInfo' import { useMutation, useSuspenseQuery } from '@tanstack/react-query' @@ -24,6 +25,7 @@ export const usePostOnboard = () => { onSuccess: ({ data }) => { const updatedUserInfo = { ...data, role: 'MEMBER' as const } setUserInfo(updatedUserInfo) + Cookies.set('role', 'MEMBER') router.push('/home') }, onError: (error) => { diff --git a/src/app/start/components/Step3.tsx b/src/app/start/components/Step3.tsx index fb59140..4a739c5 100644 --- a/src/app/start/components/Step3.tsx +++ b/src/app/start/components/Step3.tsx @@ -8,7 +8,7 @@ export default function Step3() { useProfileSelector() return ( -