From 43bc1c7d57efdf5828e9b72fd310b0cb45023c6a Mon Sep 17 00:00:00 2001 From: se0jinYoon Date: Mon, 4 Nov 2024 22:37:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20localstorage=20=EB=B0=9B=EC=95=84?= =?UTF-8?q?=EC=98=A4=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/promiseList/PromiseListPage.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/promiseList/PromiseListPage.tsx b/src/pages/promiseList/PromiseListPage.tsx index 61246a19..08c3db6d 100644 --- a/src/pages/promiseList/PromiseListPage.tsx +++ b/src/pages/promiseList/PromiseListPage.tsx @@ -7,7 +7,6 @@ import RecentCard from './components/RecentCard'; import Title from './components/Title'; import { useGetPromiseList } from './hooks/queries'; import Loading from '@components/commons/Loading'; -import { getRole } from '@utils/storage'; import ErrorPage from '@pages/errorPage/ErrorPage'; import { AutoCloseModal } from '@components/commons/modal/AutoCloseModal'; import { useState } from 'react'; @@ -15,7 +14,7 @@ import img_modal_accept from '@assets/images/img_modal_accept.png'; const PromiseListPage = () => { const [showModal, setShowModal] = useState(false); - const userRole = getRole() + ''; + const userRole = localStorage.getItem('seonyakRole') + ''; const { myNickname, pending, scheduled, past, isLoading, isError } = useGetPromiseList(); From a40cff102f545b428fd5dc5304b4f1d441c8e951 Mon Sep 17 00:00:00 2001 From: se0jinYoon Date: Tue, 5 Nov 2024 01:53:53 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EA=B0=80=EC=9E=85=EC=8B=9C=20role?= =?UTF-8?q?=20=EB=B0=9B=EC=95=84=EC=98=A4=EB=8A=94=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Step\353\262\210\355\230\270\354\236\205\353\240\245.tsx" | 3 +-- src/pages/onboarding/hooks/useJoinQuery.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git "a/src/pages/onboarding/components/commonOnboarding/Step\353\262\210\355\230\270\354\236\205\353\240\245.tsx" "b/src/pages/onboarding/components/commonOnboarding/Step\353\262\210\355\230\270\354\236\205\353\240\245.tsx" index 167e084a..4a207da4 100644 --- "a/src/pages/onboarding/components/commonOnboarding/Step\353\262\210\355\230\270\354\236\205\353\240\245.tsx" +++ "b/src/pages/onboarding/components/commonOnboarding/Step\353\262\210\355\230\270\354\236\205\353\240\245.tsx" @@ -82,7 +82,7 @@ const Step번호입력 = () => { setTimeLeft(TIME); setData((prev) => ({ ...prev, - phoneNumber: phoneNumber + phoneNumber: phoneNumber, })); }, onError: () => { @@ -118,7 +118,6 @@ const Step번호입력 = () => { if (pathname.includes('senior')) { mutate.mutate(data, { onSuccess: (res) => { - console.log(res.data.data); navigate('/seniorProfile', { state: { seniorId: res.data.data.seniorId, diff --git a/src/pages/onboarding/hooks/useJoinQuery.ts b/src/pages/onboarding/hooks/useJoinQuery.ts index 460f5aae..5c286214 100644 --- a/src/pages/onboarding/hooks/useJoinQuery.ts +++ b/src/pages/onboarding/hooks/useJoinQuery.ts @@ -7,7 +7,7 @@ const useJoinQuery = () => { const mutation = useMutation({ mutationFn: (requestBody: JoinPropType) => joinAxios(requestBody), onSuccess: (data) => { - setRole(data.data.role); + setRole(data.data.data.userType); }, onError: (error) => { console.log('🔴 join patch Error: ', error);