Skip to content

Commit

Permalink
FIX :: 없음 -> -
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI committed Sep 18, 2023
1 parent 8bcbb64 commit a553c37
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import { Storage } from '@/apis/storage/storage';
import { ROUTES, TOKEN } from '@/constants/common/constant';
import { 제출_마감_날짜, 제출_시작_날짜 } from '@/constants/form/constant';
import { color } from '@maru/theme';
import { Confirm, Text } from '@maru/ui';
import { useOverlay } from '@toss/use-overlay';
import dayjs from 'dayjs';
import { redirect, usePathname, useRouter } from 'next/navigation';
import { ReactNode, useEffect } from 'react';

Expand Down Expand Up @@ -50,35 +48,35 @@ const AuthWrapper = ({ children }: Props) => {
if (LOGGEDIN_PRIVATE_PAGE.includes(pathName)) {
redirect(ROUTES.MAIN);
}
if (
(dayjs().isBefore(제출_시작_날짜) || dayjs().isAfter(제출_마감_날짜)) &&
process.env.NODE_ENV !== 'development'
) {
if (pathName === ROUTES.FORM) {
overlay.open(({ isOpen, close }) => (
<Confirm
isOpen={isOpen}
title="원서 접수 기간이 아닙니다"
content={
<Text color={color.gray900} fontType="p2">
원서 접수 기간에만 원서 작성이 가능합니다.
<br /> 원서 접수 기간까지 조금만 기다려 주세요.
</Text>
}
onClose={close}
onConfirm={() => {
router.push(ROUTES.MAIN);
close();
}}
/>
));
router.push(ROUTES.MAIN);
return;
}
if (pathName === ROUTES.FIRST_RESULT || pathName === ROUTES.FINAL_RESULT) {
redirect(ROUTES.MAIN);
}
}
// if (
// (dayjs().isBefore(제출_시작_날짜) || dayjs().isAfter(제출_마감_날짜)) &&
// process.env.NODE_ENV !== 'development'
// ) {
// if (pathName === ROUTES.FORM) {
// overlay.open(({ isOpen, close }) => (
// <Confirm
// isOpen={isOpen}
// title="원서 접수 기간이 아닙니다"
// content={
// <Text color={color.gray900} fontType="p2">
// 원서 접수 기간에만 원서 작성이 가능합니다.
// <br /> 원서 접수 기간까지 조금만 기다려 주세요.
// </Text>
// }
// onClose={close}
// onConfirm={() => {
// router.push(ROUTES.MAIN);
// close();
// }}
// />
// ));
// router.push(ROUTES.MAIN);
// return;
// }
// if (pathName === ROUTES.FIRST_RESULT || pathName === ROUTES.FINAL_RESULT) {
// redirect(ROUTES.MAIN);
// }
// }
}
}, [token, pathName, overlay, router]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const GradeCalculator = () => {
key={`subject ${index}`}
achievementLevels={
isSpecialSubject
? ['없음', 'A', 'B', 'C']
: ['없음', 'A', 'B', 'C', 'D', 'E']
? ['-', 'A', 'B', 'C']
: ['-', 'A', 'B', 'C', 'D', 'E']
}
subjectList={subjectList}
setSubjectList={setSubjectList}
Expand All @@ -67,7 +67,7 @@ const GradeCalculator = () => {
<NewGradeCalculatorItem
id={item.id}
key={`new-subject ${index}`}
achievementLevels={['없음', 'A', 'B', 'C', 'D', 'E']}
achievementLevels={['-', 'A', 'B', 'C', 'D', 'E']}
newSubjectList={newSubjectList}
setNewSubjectList={setNewSubjectList}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const GradeCalculatorItem = ({ id, subjectList, setSubjectList, achievementLevel
const updatedData = [...prev];
updatedData[id] = {
...updatedData[id],
[name]: data === '없음' ? null : data,
[name]: data === '-' ? null : data,
};
return updatedData;
});
Expand All @@ -29,7 +29,7 @@ const GradeCalculatorItem = ({ id, subjectList, setSubjectList, achievementLevel
</Td>
<Td width={190} height="100%">
<Dropdown
value={subjectList[id].achievementLevel21 ?? '없음'}
value={subjectList[id].achievementLevel21 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand All @@ -39,7 +39,7 @@ const GradeCalculatorItem = ({ id, subjectList, setSubjectList, achievementLevel
</Td>
<Td width={190} height="100%">
<Dropdown
value={subjectList[id].achievementLevel22 ?? '없음'}
value={subjectList[id].achievementLevel22 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand All @@ -49,7 +49,7 @@ const GradeCalculatorItem = ({ id, subjectList, setSubjectList, achievementLevel
</Td>
<Td width={190} height="100%">
<Dropdown
value={subjectList[id].achievementLevel31 ?? '없음'}
value={subjectList[id].achievementLevel31 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const NewGradeCalculatorItem = ({
const updatedData = [...prev];
updatedData[newSubjectIndex] = {
...updatedData[newSubjectIndex],
[name]: data === '없음' ? null : data,
[name]: data === '-' ? null : data,
};
return updatedData;
});
Expand All @@ -48,7 +48,7 @@ const NewGradeCalculatorItem = ({
</Td>
<Td width={190} height="100%">
<Dropdown
value={newSubjectList[newSubjectIndex].achievementLevel21 ?? '없음'}
value={newSubjectList[newSubjectIndex].achievementLevel21 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand All @@ -58,7 +58,7 @@ const NewGradeCalculatorItem = ({
</Td>
<Td width={190} height="100%">
<Dropdown
value={newSubjectList[newSubjectIndex].achievementLevel22 ?? '없음'}
value={newSubjectList[newSubjectIndex].achievementLevel22 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand All @@ -68,7 +68,7 @@ const NewGradeCalculatorItem = ({
</Td>
<Td width={190} height="100%">
<Dropdown
value={newSubjectList[newSubjectIndex].achievementLevel31 ?? '없음'}
value={newSubjectList[newSubjectIndex].achievementLevel31 ?? '-'}
size="SMALL"
data={achievementLevels}
width={80}
Expand Down

0 comments on commit a553c37

Please sign in to comment.