diff --git a/src/App.tsx b/src/App.tsx index adeab4d..deb8d32 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,6 +21,7 @@ import { theme } from '@/styles'; import ResetPWMode from './pages/auth/resetPW/ResetPWMode'; import ResetPWStep from './pages/auth/resetPW/ResetPWSteps'; import AccountSetting from './pages/settings/AccountSetting'; +import FAQPage from './pages/settings/FAQPage'; import PopupMessage from './components/common/PopupMessage'; import LoginRedirect from './pages/auth/login/LoginRedirect'; @@ -75,6 +76,7 @@ function App() { } /> } /> + } /> } /> } /> } /> diff --git a/src/pages/settings/FAQPage.tsx b/src/pages/settings/FAQPage.tsx new file mode 100644 index 0000000..e0cb164 --- /dev/null +++ b/src/pages/settings/FAQPage.tsx @@ -0,0 +1,104 @@ +/* eslint-disable import/order */ +import { + Box, Accordion, + AccordionDetails, + AccordionSummary, + Typography +} from '@mui/material'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { useEffect } from 'react'; + +import { bottomNavigation, stepIndex } from '@/store/common'; +import { useNavigate } from 'react-router-dom'; +import { useRecoilState, useSetRecoilState } from 'recoil'; +import { modalState } from '@/store/modal'; +import Wrapper from '../auth/common/Wrapper'; +import CommonHeader from '@/components/layout/CommonHeader'; + +const FAQPage = () => { + const navigation = useNavigate(); + const setNavPage = useSetRecoilState(bottomNavigation); + + const setStepIndex = useSetRecoilState(stepIndex); + + const [modalInfo, setModalInfo] = useRecoilState(modalState); + + const faqTexts = [ + { + title: '모드가 무엇인가요?', + content: + '현재 모드는 일반인, 직장인, 학생 3가지 모드가 있습니다.

일반인을 제외한 모드별 특정 카테고리가 있으며, 아래와 같습니다. 직장인 : 직장 - 업무, 야근, 출장, 회식 학생 : 학생 - 00, 00, 00', + }, + { + title: '시작하는 시간을 변경할 수 있나요?', + content: + '현재 모드는 일반인, 직장인, 학생 3가지 모드가 있습니다.

일반인을 제외한 모드별 특정 카테고리가 있으며, 아래와 같습니다. 직장인 : 직장 - 업무, 야근, 출장, 회식 학생 : 학생 - 00, 00, 00', + }, + ]; + + /** + * get faq accordion item + * @param param + * @returns accordion item + */ + const getAccordionItem = ({ + title, + content, + }: { + title: string; + content: string; + }) => { + return ( + + } + > + Q. {title} + + + {content} + + + ); + }; + + /** + * get faq accordion + */ + const getAccordion = () => { + return ( + + {faqTexts.map((faq) => + getAccordionItem({ title: faq.title, content: faq.content }) + )} + + ); + }; + + useEffect(() => { + setNavPage(2); + setStepIndex(0); + }); + + return ( + } + handlePrevBtn={() => navigation('/settings')} + > + {getAccordion()} + + ); +}; + +export default FAQPage; diff --git a/src/pages/settings/SettingsPage.tsx b/src/pages/settings/SettingsPage.tsx index 267d82d..bf06374 100644 --- a/src/pages/settings/SettingsPage.tsx +++ b/src/pages/settings/SettingsPage.tsx @@ -174,8 +174,7 @@ const SettingPage = () => { })} {getListSubHeader('고객 센터')} - {getListItem({ text: '도움말' })} - {getListItem({ text: '문의하기' })} + {getListItem({ text: 'FAQ', handler: () => navigation('/settings/faq') })} {getListSubHeader('계정')} {getListItem({