Skip to content

Commit

Permalink
FIX: 자체폼 신청 기간 아닐 때 표시되는 기본 문구 및 시작일/종료일 문구 번역 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hirediversity committed Aug 23, 2023
1 parent 68eb84b commit fc4d70f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions components/FormPage/PageSorry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { Auth } from 'fe-modules/models/auth';
import { FormPageProps } from 'fe-modules/models/FormPage/FormPage';
import { FormUISetting } from 'fe-modules/models/FormUI/FormUI';
import { SupportLanguage } from 'fe-modules/models/lang';
import { useTranslation } from 'next-i18next';
import { useForm } from 'react-hook-form';

export default function PageSorry({ props, lang, auth }: { props: FormPageProps; lang: SupportLanguage; auth: Auth }) {
const { t } = useTranslation('customForm');

useEffect(() => {
scrollTo(0, 0);
}, []);

return (
<>
<FlexBox sx={{ width: '100%', height: '100%', justifyContent: 'space-between', flexDirection: 'column' }}>
Expand All @@ -20,13 +24,13 @@ export default function PageSorry({ props, lang, auth }: { props: FormPageProps;
</Typography>
<FlexBox sx={{ mt: 6, justifyContent: 'space-between', width: '100%', flexDirection: 'column', gap: 2 }}>
<FlexBox sx={{ justifyContent: 'space-between', width: '100%' }}>
<Typography variant="subtitle2">Start Date</Typography>
<Typography variant="subtitle2">{t('신청기간아님.시작일')}</Typography>
<Typography variant="body1">
{props.startDate ? new Date(props.startDate).toLocaleString() : '-'}
</Typography>
</FlexBox>
<FlexBox sx={{ justifyContent: 'space-between', width: '100%' }}>
<Typography variant="subtitle2">End Date</Typography>
<Typography variant="subtitle2">{t('신청기간아님.종료일')}</Typography>
<Typography variant="body1">{props.endDate ? new Date(props.endDate).toLocaleString() : '-'}</Typography>
</FlexBox>
</FlexBox>
Expand All @@ -40,10 +44,8 @@ export default function PageSorry({ props, lang, auth }: { props: FormPageProps;
auth={auth}
/>
) : (
<Typography variant="body1">
The application period is not open now.
<br />
Please check the application period.
<Typography variant="body1" sx={{ whiteSpace: 'pre-line' }}>
{t('신청기간아님.본문')}
</Typography>
)}
</Box>
Expand Down

0 comments on commit fc4d70f

Please sign in to comment.