From 62091f3222037fbdb680c4f182ddced9e5a400cf Mon Sep 17 00:00:00 2001 From: SEOKKAMONI Date: Wed, 4 Oct 2023 16:45:10 +0900 Subject: [PATCH 1/2] =?UTF-8?q?FIX=20::=20=EC=84=B1=EC=A0=81=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20Nan=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\352\265\220\352\263\274\354\204\261\354\240\201.tsx" | 6 +++--- .../ScoreCalculator/GradeCalculator/GradeCalculator.tsx | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git "a/apps/admin/src/components/form/FormDetailContent/\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201.tsx" "b/apps/admin/src/components/form/FormDetailContent/\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201.tsx" index ca90fffea..61cf7c96c 100644 --- "a/apps/admin/src/components/form/FormDetailContent/\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201.tsx" +++ "b/apps/admin/src/components/form/FormDetailContent/\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201/\352\265\220\352\263\274\354\204\261\354\240\201.tsx" @@ -23,9 +23,9 @@ const 교과성적 = ({ id }: Props) => { {achievementLevelsGroupList.map((group) => ( <교과성적Item subjectName={group.subjectName} - achievementLevel21={group.achievementLevels[0] || '없음'} - achievementLevel22={group.achievementLevels[1] || '없음'} - achievementLevel31={group.achievementLevels[2] || '없음'} + achievementLevel21={group.achievementLevels[0] || '-'} + achievementLevel22={group.achievementLevels[1] || '-'} + achievementLevel31={group.achievementLevels[2] || '-'} /> ))} diff --git a/apps/user/src/components/form/Calculators/ScoreCalculator/GradeCalculator/GradeCalculator.tsx b/apps/user/src/components/form/Calculators/ScoreCalculator/GradeCalculator/GradeCalculator.tsx index 164591c28..2c0b0e09a 100644 --- a/apps/user/src/components/form/Calculators/ScoreCalculator/GradeCalculator/GradeCalculator.tsx +++ b/apps/user/src/components/form/Calculators/ScoreCalculator/GradeCalculator/GradeCalculator.tsx @@ -35,9 +35,7 @@ const GradeCalculator = () => { id={id} key={`subject ${id}`} achievementLevels={ - isSpecialSubject - ? ['없음', 'A', 'B', 'C'] - : ['없음', 'A', 'B', 'C', 'D', 'E'] + isSpecialSubject ? ['-', 'A', 'B', 'C'] : ['-', 'A', 'B', 'C', 'D', 'E'] } /> ); @@ -47,7 +45,7 @@ const GradeCalculator = () => { ))} From 9fa95960501039dfde26ee357b17249dc5134d11 Mon Sep 17 00:00:00 2001 From: SEOKKAMONI Date: Wed, 4 Oct 2023 16:53:49 +0900 Subject: [PATCH 2/2] =?UTF-8?q?FIX=20::=20=EC=9E=98=EB=AA=BB=EB=90=9C=20?= =?UTF-8?q?=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Wrappers/AuthWrapper/AuthWrapper.tsx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/user/src/components/common/Wrappers/AuthWrapper/AuthWrapper.tsx b/apps/user/src/components/common/Wrappers/AuthWrapper/AuthWrapper.tsx index f53c1cd94..ad2962662 100644 --- a/apps/user/src/components/common/Wrappers/AuthWrapper/AuthWrapper.tsx +++ b/apps/user/src/components/common/Wrappers/AuthWrapper/AuthWrapper.tsx @@ -1,8 +1,6 @@ import { ROUTES } from '@/constants/common/constant'; -import { 제출_마감_날짜, 제출_시작_날짜 } from '@/constants/form/constant'; import { useUser } from '@/hooks'; import { useOverlay } from '@toss/use-overlay'; -import dayjs from 'dayjs'; import { usePathname, useRouter } from 'next/navigation'; import { ReactNode, useEffect } from 'react'; import FormPeriodModal from './FormPeriodModal/FormPeriodModal'; @@ -30,23 +28,25 @@ const AuthWrapper = ({ children }: Props) => { }; useEffect(() => { - if (NOT_LOGGEDIN_PRIVATE_PAGE.includes(pathName) && !isLoggedIn) { - openRequiredLoginModal(); - router.push(ROUTES.MAIN); - } + // 로그인이 되었을때 if (isLoggedIn) { if (LOGGEDIN_PRIVATE_PAGE.includes(pathName)) { openFormPeriodModal(); router.push(ROUTES.MAIN); - } else if ( - dayjs().isBefore(제출_시작_날짜) || - (dayjs().isAfter(제출_마감_날짜) && process.env.NODE_ENV !== 'development') - ) { - if (pathName === ROUTES.FORM) { - router.push(ROUTES.MAIN); - } else if (pathName === ROUTES.FIRST_RESULT || pathName === ROUTES.FINAL_RESULT) { - router.push(ROUTES.MAIN); - } + } + // else if (dayjs().isBefore(제출_시작_날짜) || dayjs().isAfter(제출_마감_날짜)) { + // if (pathName === ROUTES.FORM) { + // router.push(ROUTES.MAIN); + // } else if (pathName === ROUTES.FIRST_RESULT || pathName === ROUTES.FINAL_RESULT) { + // router.push(ROUTES.MAIN); + // } + // } + } + // 로그인이 되지 않았을때 + else { + if (NOT_LOGGEDIN_PRIVATE_PAGE.includes(pathName)) { + openRequiredLoginModal(); + router.push(ROUTES.MAIN); } } }, [isLoggedIn, pathName]);