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 && }