diff --git a/src/assets/img/email-01.png b/src/assets/img/email-01.png new file mode 100644 index 0000000..81fb352 Binary files /dev/null and b/src/assets/img/email-01.png differ diff --git a/src/assets/img/email-02.png b/src/assets/img/email-02.png new file mode 100644 index 0000000..1492208 Binary files /dev/null and b/src/assets/img/email-02.png differ diff --git a/src/assets/img/email-03.png b/src/assets/img/email-03.png new file mode 100644 index 0000000..e61187a Binary files /dev/null and b/src/assets/img/email-03.png differ diff --git a/src/assets/img/email-04.png b/src/assets/img/email-04.png new file mode 100644 index 0000000..8cbe251 Binary files /dev/null and b/src/assets/img/email-04.png differ diff --git a/src/assets/img/email-05.png b/src/assets/img/email-05.png new file mode 100644 index 0000000..3205909 Binary files /dev/null and b/src/assets/img/email-05.png differ diff --git a/src/assets/img/email-06.png b/src/assets/img/email-06.png new file mode 100644 index 0000000..d6b2c40 Binary files /dev/null and b/src/assets/img/email-06.png differ diff --git a/src/components/base/LoginCheck.tsx b/src/components/base/LoginCheck.tsx new file mode 100644 index 0000000..c64e4dc --- /dev/null +++ b/src/components/base/LoginCheck.tsx @@ -0,0 +1,35 @@ +import React, { useEffect } from 'react'; +import Cookies from 'js-cookie'; +import { Modal } from '@/components/base/index'; +import { useToggle } from '@/hooks/common'; +import { useLocation, useNavigate } from 'react-router-dom'; + +const LoginCheck = () => { + const navigate = useNavigate(); + const location = useLocation(); + const [isErrorModal, onToggleErrorModal] = useToggle(); + + useEffect(() => { + const token = Cookies.get('AccessToken'); + const invalidToken = !token || token === 'undefined'; + invalidToken && onToggleErrorModal(); + }, [location]); + + return ( + <> + {isErrorModal && ( + navigate('/')} + /> + )} + + ); +}; + +export default LoginCheck; diff --git a/src/components/domain/matching/MatchingTemplete.tsx b/src/components/domain/matching/MatchingTemplete.tsx index ede5ca8..18e9653 100644 --- a/src/components/domain/matching/MatchingTemplete.tsx +++ b/src/components/domain/matching/MatchingTemplete.tsx @@ -33,6 +33,7 @@ const initMeetingSurvey: MeetingPartnerSurvey = { mindset: '', play: '', universities: '', + payDeadline: '', }; const initDatingSurvey: DatingPartnerSurvey = { @@ -46,6 +47,7 @@ const initDatingSurvey: DatingPartnerSurvey = { isSmoke: false, kakaoId: '', university: '', + payDeadline: '', }; const MatchingTemplete = ({ meeting, dating, btnName, title, handleStatus }: MatchingTemplateProps) => { diff --git a/src/components/domain/matching/MeetingEndBox.tsx b/src/components/domain/matching/MeetingEndBox.tsx index 7bf3793..00d9c41 100644 --- a/src/components/domain/matching/MeetingEndBox.tsx +++ b/src/components/domain/matching/MeetingEndBox.tsx @@ -1,13 +1,10 @@ import { palette } from '@/lib/styles/palette'; -import { schools } from '@/mock/schools'; import styled from 'styled-components'; import KakaoCopyBox from './KakaoCopyBox'; -import { conversionDepartment, conversionDomesticArea, conversionMindset, conversionPlay } from '@/utils/converson'; +import { conversionDepartment, conversionMindset, conversionPlay } from '@/utils/converson'; import { addComma } from '@/utils/addComma'; -import { addCommaTail } from '@/utils/addCommaTail'; -import { DatingPartnerSurvey } from '@/types/dating'; import { memo } from 'react'; -import { Departments, MeetingPartnerSurvey, MindSet, Play } from '@/types/meeting'; +import { MeetingPartnerSurvey } from '@/types/meeting'; function MeetingEndBox({ areas, averageAge, averageHeight, departments, kakaoId, mindset, play, universities }: MeetingPartnerSurvey) { return ( diff --git a/src/components/domain/survey/Template.tsx b/src/components/domain/survey/Template.tsx new file mode 100644 index 0000000..a4fa58e --- /dev/null +++ b/src/components/domain/survey/Template.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { Outlet } from 'react-router-dom'; +import LoginCheck from '@/components/base/LoginCheck'; + +const Template = () => { + return ( + <> + + + + ); +}; + +export default Template; diff --git a/src/components/header/UserHeader.tsx b/src/components/header/UserHeader.tsx index 9b9bf0a..e0db813 100644 --- a/src/components/header/UserHeader.tsx +++ b/src/components/header/UserHeader.tsx @@ -5,6 +5,7 @@ import { Outlet } from 'react-router-dom'; import styled from 'styled-components'; import { HeaderWrapper, Logo } from '../domain/survey/SurveyTemplate'; import MenuBlock from './MenuBlock'; +import LoginCheck from '@/components/base/LoginCheck'; const UserHeader = () => { const [isMenu, onToggleMenu] = useToggle(); @@ -18,6 +19,7 @@ const UserHeader = () => { + ); }; diff --git a/src/hooks/common/useDateLabel.ts b/src/hooks/common/useDateLabel.ts index fc53caf..c633b91 100644 --- a/src/hooks/common/useDateLabel.ts +++ b/src/hooks/common/useDateLabel.ts @@ -1,4 +1,4 @@ -function useDateLabel(date: string) { +function useDateLabel(date: string): string { const parseDate = new Date(date); const month = parseDate.getMonth() + 1; diff --git a/src/router/Routing.tsx b/src/router/Routing.tsx index 227b538..06e91f9 100644 --- a/src/router/Routing.tsx +++ b/src/router/Routing.tsx @@ -38,6 +38,8 @@ import { import Test from '@/components/base/Test'; import UserHeader from '@/components/header/UserHeader'; import { palette } from '@/lib/styles/palette'; +import LoginCheck from '@/components/base/LoginCheck'; +import Template from '@/components/domain/survey/Template'; function Routing() { return ( @@ -53,7 +55,7 @@ function Routing() { } /> } /> } /> - }> + }> } /> } /> } /> @@ -70,7 +72,7 @@ function Routing() { } /> } /> - }> + }> } /> } /> } />