From 41334b115f1c9560964ae4bb1b8e39956dc0e146 Mon Sep 17 00:00:00 2001 From: seoAreum <1971236@hansung.ac.kr> Date: Fri, 19 Jan 2024 21:12:19 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9D=B4=EB=AF=B8=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=ED=95=9C=20=EC=82=AC=EC=9A=A9=EC=9E=90=EB=8A=94=20?= =?UTF-8?q?=EC=8A=A4=ED=94=8C=EB=9E=98=EC=8B=9C=EB=B7=B0=EB=A1=9C=20?= =?UTF-8?q?=EB=84=98=EC=96=B4=EA=B0=80=EC=A7=80=20=EC=95=8A=EA=B2=8C=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 --- src/SelectView/SelectView.tsx | 3 ++- src/Splash/page/SplashPage/index.tsx | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SelectView/SelectView.tsx b/src/SelectView/SelectView.tsx index 33f1eef8..4c57d148 100644 --- a/src/SelectView/SelectView.tsx +++ b/src/SelectView/SelectView.tsx @@ -7,12 +7,13 @@ import SplashPage from '../Splash/page/SplashPage'; function SelectView() { const { state } = useLocation(); const [step, setStep] = useState(state?.step ? state.step : 0); + const token = localStorage.getItem('token'); const handleStep = (step: number) => { setStep(step); }; - return step === 0 ? ( + return !token && step === 0 ? ( ) : ( diff --git a/src/Splash/page/SplashPage/index.tsx b/src/Splash/page/SplashPage/index.tsx index d1bb2e8a..9558d734 100644 --- a/src/Splash/page/SplashPage/index.tsx +++ b/src/Splash/page/SplashPage/index.tsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +// import { useEffect } from 'react'; import LoadingPage from '../../../components/common/LoadingPage'; import Body from '../../component/Body'; @@ -14,10 +14,6 @@ export interface StepProps { function SplashPage({ handleStep }: StepProps) { const { isLoading } = useGetNoteNum(); - useEffect(() => { - handleStep(0); - }, []); - return ( {isLoading && }