From dc575ed884521407beb206bc22f25351cf9debab Mon Sep 17 00:00:00 2001 From: Eonseok Jeon <121864459+eonseok-jeon@users.noreply.github.com> Date: Wed, 31 Jul 2024 07:27:51 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=EC=A7=80=EC=9B=90=20=EC=95=88=ED=96=88?= =?UTF-8?q?=EC=9C=BC=EB=A9=B4=20=EA=B2=B0=EA=B3=BC=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=A7=89=EA=B8=B0=20=20(#317)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 지원서 제출 안 했거나 서류 탈락하면 result page 못 들어가게 막기 --- src/views/ResultPage/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/ResultPage/index.tsx b/src/views/ResultPage/index.tsx index 9b45a03d..00a1ea8b 100644 --- a/src/views/ResultPage/index.tsx +++ b/src/views/ResultPage/index.tsx @@ -4,12 +4,15 @@ import useDate from '@hooks/useDate'; import { ThemeContext } from '@store/themeContext'; import NoMore from 'views/ErrorPage/components/NoMore'; import BigLoading from 'views/loadings/BigLoding'; +import useGetMyInfo from 'views/SignedInPage/hooks/useGetMyInfo'; import FinalResult from './components/FinalResult'; import ScreeningResult from './components/ScreeningResult'; const ResultPage = () => { const { handleChangeMode } = useContext(ThemeContext); + const { myInfoData, myInfoIsLoading } = useGetMyInfo(); + const { submit, applicationPass } = myInfoData?.data || {}; const { NoMoreRecruit, NoMoreScreeningResult, NoMoreFinalResult, isLoading, isMakers } = useDate(); @@ -21,14 +24,15 @@ const ResultPage = () => { }; }, [handleChangeMode]); - if (isLoading) return ; - if (NoMoreRecruit || (NoMoreScreeningResult && NoMoreFinalResult)) + if (isLoading || myInfoIsLoading) return ; + if (!submit || NoMoreRecruit || (NoMoreScreeningResult && NoMoreFinalResult)) return ; return ( <> {!NoMoreScreeningResult && } - {!NoMoreFinalResult && } + {!NoMoreFinalResult && + (applicationPass ? : )} ); };