back 키 제어
This commit is contained in:
@@ -7,13 +7,14 @@ import { useTranslation } from 'react-i18next';
|
||||
import { NoticeDetail } from '@/entities/support/ui/detail/notice-detail';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { useDetailOnStore } from '@/shared/model/store';
|
||||
|
||||
export const HomeNoticeList = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [resultList, setResultList] = useState<Array<NoticeItem>>([]);
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const { detailOn, setDetailOn } = useDetailOnStore();
|
||||
const [detailSeq, setDetailSeq] = useState<number | string>();
|
||||
|
||||
const { mutateAsync: noticeList } = useNoticeListMutation();
|
||||
|
||||
@@ -18,6 +18,7 @@ import { FaqDetail } from '@/entities/support/ui/detail/faq-detail';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { useDetailOnStore } from '@/shared/model/store';
|
||||
|
||||
export const FaqListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -28,7 +29,7 @@ export const FaqListPage = () => {
|
||||
const [searchValue, setSearchValue] = useState<string>('');
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>('');
|
||||
const [resultList, setResultList] = useState<Array<FaqItem>>([]);
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const { detailOn, setDetailOn } = useDetailOnStore();
|
||||
const [detailFaqItem, setDetailFaqItem] = useState<FaqItem>({});
|
||||
|
||||
useSetHeaderTitle(t('support.faq.title'));
|
||||
|
||||
@@ -18,6 +18,7 @@ import { NoticeDetail } from '@/entities/support/ui/detail/notice-detail';
|
||||
import { useParams } from 'react-router';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { useDetailOnStore } from '@/shared/model/store';
|
||||
|
||||
export const NoticeListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -29,7 +30,7 @@ export const NoticeListPage = () => {
|
||||
const [informCl, setInformCl] = useState<InformCl | string>('');
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [resultList, setResultList] = useState<Array<NoticeItem>>([]);
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const { detailOn, setDetailOn } = useDetailOnStore();
|
||||
const [detailSeq, setDetailSeq] = useState<number | string>();
|
||||
|
||||
useSetHeaderTitle(t('support.notice.title'));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { useDetailOnStore, useStore } from '@/shared/model/store';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
@@ -39,7 +39,7 @@ export const QnaListPage = () => {
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [statusCode, setStatusCode] = useState<string>(''); // 02, 03
|
||||
const [resultList, setResultList] = useState<Array<QnaItem>>([]);
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const { detailOn, setDetailOn } = useDetailOnStore();
|
||||
const [detailSeq, setDetailSeq] = useState<string | number>();
|
||||
|
||||
useSetHeaderTitle(t('support.qna.title'));
|
||||
|
||||
Reference in New Issue
Block a user