공지사항 뒤로가기 처리
This commit is contained in:
@@ -16,7 +16,8 @@ export const HomeNoticeItem = ({
|
|||||||
const onClickToDetail = () => {
|
const onClickToDetail = () => {
|
||||||
navigate(PATHS.support.notice.detail, {
|
navigate(PATHS.support.notice.detail, {
|
||||||
state: {
|
state: {
|
||||||
id: id
|
id: id,
|
||||||
|
from: PATHS.home
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ export const SupportNoticeItem = ({
|
|||||||
const onClickToDetail = () => {
|
const onClickToDetail = () => {
|
||||||
navigate(PATHS.support.notice.detail, {
|
navigate(PATHS.support.notice.detail, {
|
||||||
state: {
|
state: {
|
||||||
id: id
|
id: id,
|
||||||
|
from: PATHS.support.notice.list
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,15 +19,25 @@ export const NoticeDetailPage = () => {
|
|||||||
|
|
||||||
const [result, setResult] = useState<NoticeItem>({});
|
const [result, setResult] = useState<NoticeItem>({});
|
||||||
|
|
||||||
|
let from = location?.state.from;
|
||||||
|
|
||||||
useSetHeaderTitle('공지사항');
|
useSetHeaderTitle('공지사항');
|
||||||
useSetHeaderType(HeaderType.RightClose);
|
useSetHeaderType(HeaderType.RightClose);
|
||||||
useSetFooterMode(false);
|
useSetFooterMode(false);
|
||||||
useSetOnBack(() => {
|
useSetOnBack(() => {
|
||||||
|
if(from){
|
||||||
|
navigate(from);
|
||||||
|
}
|
||||||
|
else{
|
||||||
navigate(PATHS.support.notice.list);
|
navigate(PATHS.support.notice.list);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { mutateAsync: noticeDetail } = useNoticeDetailMutation();
|
const { mutateAsync: noticeDetail } = useNoticeDetailMutation();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const callDetail = () => {
|
const callDetail = () => {
|
||||||
let detailParams = {
|
let detailParams = {
|
||||||
noticeId: location?.state.id,
|
noticeId: location?.state.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user