diff --git a/src/entities/support/model/types.ts b/src/entities/support/model/types.ts index 7d593c9..3b8e723 100644 --- a/src/entities/support/model/types.ts +++ b/src/entities/support/model/types.ts @@ -7,17 +7,22 @@ export interface FaqListParams { category: string; searchValue: string; }; -export interface FaqListItemProps { - sortNo: string; - seq: string; - category: string; - categoryName: string; - title: string; - contents: string; +export interface FaqListItem { + sortNo?: string; + seq?: string; + category?: string; + categoryName?: string; + title?: string; + contents?: string; }; export interface FaqListResponse extends DefaulResponsePagination { - content: Array; + content: Array; + hasNext: boolean; + nextCursor: string | null; }; +export interface FaqItemProps extends FaqListItem { + +} export interface CounselListParams extends SupportParams { }; diff --git a/src/entities/support/ui/faq-item.tsx b/src/entities/support/ui/faq-item.tsx new file mode 100644 index 0000000..abcc210 --- /dev/null +++ b/src/entities/support/ui/faq-item.tsx @@ -0,0 +1,37 @@ +import { PATHS } from '@/shared/constants/paths'; +import { useNavigate } from '@/shared/lib/hooks/use-navigate'; +import { FaqItemProps } from '../model/types'; + +export const SupportFaqItem = ({ + sortNo, + seq, + category, + categoryName, + title, + contents, +}: FaqItemProps) => { + const { navigate } = useNavigate(); + + const onClickToDetail = () => { + navigate(PATHS.support.faq.detail, { + state: { + title, + contents + } + }); + }; + + return ( + <> +
onClickToDetail() } + > +
+
{ title }
+
{ categoryName }
+
+
+ + ); +} \ No newline at end of file diff --git a/src/pages/support/faq/detail-page.tsx b/src/pages/support/faq/detail-page.tsx index 5155541..fec9e47 100644 --- a/src/pages/support/faq/detail-page.tsx +++ b/src/pages/support/faq/detail-page.tsx @@ -1,18 +1,46 @@ +import { useEffect, useState } from 'react'; +import { PATHS } from '@/shared/constants/paths'; +import { useLocation } from 'react-router'; +import { useNavigate } from '@/shared/lib/hooks/use-navigate'; import { HeaderType } from '@/entities/common/model/types'; import { useSetHeaderTitle, useSetHeaderType, - useSetFooterMode + useSetFooterMode, + useSetOnBack } from '@/widgets/sub-layout/use-sub-layout'; export const FaqDetailPage = () => { - useSetHeaderTitle('자주 묻는 질문'); - useSetHeaderType(HeaderType.RightClose); - useSetFooterMode(false); + const { navigate } = useNavigate(); + const location = useLocation(); + const [title, setTitle] = useState(''); + const [contents, setContents] = useState(''); + + useSetHeaderTitle('자주 묻는 질문'); + useSetHeaderType(HeaderType.LeftArrow); + useSetFooterMode(false); + useSetOnBack(() => { + navigate(PATHS.support.faq.list); + }); + + useEffect(() => { + setTitle(location?.state.title); + setContents(location?.state.contents); + }, []); return ( <> - +
+
+
+
+
{ title }
+
+
{ contents }
+
+
+
+
); }; \ No newline at end of file diff --git a/src/pages/support/faq/list-page.tsx b/src/pages/support/faq/list-page.tsx index 2a5def5..0baa2e9 100644 --- a/src/pages/support/faq/list-page.tsx +++ b/src/pages/support/faq/list-page.tsx @@ -1,18 +1,115 @@ +import { ChangeEvent, useEffect, useState } from 'react'; +import { PATHS } from '@/shared/constants/paths'; +import { useNavigate } from '@/shared/lib/hooks/use-navigate'; import { HeaderType } from '@/entities/common/model/types'; +import { useFaqListMutation } from '@/entities/support/api/use-faq-list-mutation'; +import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constants'; +import { FaqListItem } from '@/entities/support/model/types'; +import { SupportFaqItem } from '@/entities/support/ui/faq-item'; import { useSetHeaderTitle, useSetHeaderType, - useSetFooterMode + useSetFooterMode, + useSetOnBack } from '@/widgets/sub-layout/use-sub-layout'; export const FaqListPage = () => { + const { navigate } = useNavigate(); + + const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM); + const [searchValue, setSearchValue] = useState(''); + const [resultList, setResultList] = useState>([]); + useSetHeaderTitle('자주 묻는 질문'); useSetHeaderType(HeaderType.LeftArrow); useSetFooterMode(true); + useSetOnBack(() => { + navigate(PATHS.home); + }); + + const { mutateAsync: faqList } = useFaqListMutation(); + const callList = () => { + let listParams = { + category: 'st', + searchValue: searchValue, + ...{page: pageParam} + }; + + faqList(listParams).then((rs) => { + console.log(rs) + setResultList(rs.content); + }); + }; + + const onClickToAction = () => { + callList(); + }; + + const getFaqList = () => { + let rs = []; + for(let i=0;i + ) + } + return rs; + }; + + const onClickToNavigation = () => { + navigate(PATHS.support.qna.list); + }; + + useEffect(() => { + callList(); + }, []); return ( <> - +
+
+
+
+
+ + ) => setSearchValue(e.target.value) } + /> +
+
+ 전체 + +
+
+ { getFaqList() } +
+
+
+ +
+
+
+
); }; \ No newline at end of file diff --git a/src/pages/support/notice/list-page.tsx b/src/pages/support/notice/list-page.tsx index 1698142..6faa8a4 100644 --- a/src/pages/support/notice/list-page.tsx +++ b/src/pages/support/notice/list-page.tsx @@ -1,18 +1,85 @@ +import { PATHS } from '@/shared/constants/paths'; +import { useNavigate } from '@/shared/lib/hooks/use-navigate'; import { HeaderType } from '@/entities/common/model/types'; import { useSetHeaderTitle, useSetHeaderType, - useSetFooterMode + useSetFooterMode, + useSetOnBack } from '@/widgets/sub-layout/use-sub-layout'; export const NoticeListPage = () => { + const { navigate } = useNavigate(); + useSetHeaderTitle('공지사항'); useSetHeaderType(HeaderType.LeftArrow); useSetFooterMode(true); - + useSetOnBack(() => { + navigate(PATHS.home); + }); return ( <> - +
+
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
신한은행 시스템 작업 안내신한은행 시스템 작업 안내신한은행 시스템 작업 안내신한은행 시스템 작업 안내신한은행 시스템 작업 안내
+
+ 공지사항2025.06.01 10:00:00 +
+
+
+
+
+
NICE페이먼츠 도메인 인증서 G2교체 작업 안내
+
+ 공지사항2025.06.01 10:00:00 +
+
+
+
+
+
N자금이체 서비스 도메인 인증서 G2 교체 작업 및 TLS 프로토콜 개선 안내 ...
+
+ 공지사항2025.06.01 10:00:00 +
+
+
+
+
+
N자금이체 서비스 도메인 인증서 G2 교체 작업 및 TLS 프로토콜 개선 안내 ...
+
+ 공지사항2025.06.01 10:00:00 +
+
+
+
+
+
NICE페이먼츠 도메인 인증서 G2교체 작업 안내
+
+ 공지사항2025.06.01 10:00:00 +
+
+
+
+
+
+
+
); }; \ No newline at end of file diff --git a/src/shared/constants/route-names.ts b/src/shared/constants/route-names.ts index f899bc3..d002cdc 100644 --- a/src/shared/constants/route-names.ts +++ b/src/shared/constants/route-names.ts @@ -118,7 +118,7 @@ export const ROUTE_NAMES = { faq: { base: '/faq/*', list: 'list', - detail: 'detail/:faqId', + detail: 'detail', }, qna: { base: '/qna/*',