qna 권한
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user