Skip to content

Commit

Permalink
Merge pull request #445 from Bamdoliro/main
Browse files Browse the repository at this point in the history
main -> develop
  • Loading branch information
SEOKKAMONI authored Oct 16, 2023
2 parents 9219aa2 + 780a3ef commit 38bcf1d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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] || '-'}
/>
))}
</Column>
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
/>
);
Expand All @@ -47,7 +45,7 @@ const GradeCalculator = () => {
<NewGradeCalculatorItem
id={id}
key={`new-subject ${id}`}
achievementLevels={['없음', 'A', 'B', 'C', 'D', 'E']}
achievementLevels={['-', 'A', 'B', 'C', 'D', 'E']}
/>
))}
<GradeCalculatorFooter>
Expand Down

1 comment on commit 38bcf1d

@vercel
Copy link

@vercel vercel bot commented on 38bcf1d Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.