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