qna 권한

This commit is contained in:
focp212@naver.com
2025-11-05 16:01:18 +09:00
parent 1bf0421e04
commit 1964d9f716

View File

@@ -17,7 +17,11 @@ import {
} from '@/widgets/sub-layout/use-sub-layout';
import { QnaDetail } from '@/entities/support/ui/detail/qna-detail';
import { useParams } from 'react-router';
import { checkGrant } from '@/shared/lib/check-grant';
import { showAlert } from '@/widgets/show-alert';
/* 1:1 문의 */
const menuId = 64;
export const QnaListPage = () => {
const { navigate } = useNavigate();
const { seq } = useParams();
@@ -133,7 +137,12 @@ export const QnaListPage = () => {
};
const onClickToNavigation = () => {
navigate(PATHS.support.qna.register);
if(checkGrant(menuId, 'W')){
navigate(PATHS.support.qna.register);
}
else{
showAlert('권한이 없습니다.');
}
};
useEffect(() => {