From e9070070dfc95aac29c895fefe0587765a23ee98 Mon Sep 17 00:00:00 2001 From: dntjd1097 Date: Tue, 26 Sep 2023 01:50:52 +0900 Subject: [PATCH] =?UTF-8?q?feature=20:=20=EC=82=AC=EC=9A=A9=EC=9E=90=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin(deprecated)/src/pages/Members/index.tsx | 9 ++++++++- apps/admin(deprecated)/src/pages/Redirect/index.tsx | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/admin(deprecated)/src/pages/Members/index.tsx b/apps/admin(deprecated)/src/pages/Members/index.tsx index b72dd04c..ae67fab3 100644 --- a/apps/admin(deprecated)/src/pages/Members/index.tsx +++ b/apps/admin(deprecated)/src/pages/Members/index.tsx @@ -10,10 +10,12 @@ import { AdminContainer, AdminContainerInner } from '@pages/styled'; import { useGetMemberListData } from '@src/apis/hooks/useGetMemberListData'; import { useModalHandle } from '@src/hooks/useModalHandle'; import { IUserDataType } from '@type/userDataType'; +import { useGetMyData } from '@src/apis/hooks/useGetMyData'; const Members = () => { const { memberListData } = useGetMemberListData(); const { openModal, closeModal } = useModalHandle('MEMBER'); + const { userData } = useGetMyData(); const [selectMember, setSelectMember] = React.useState( null, ); @@ -54,7 +56,12 @@ const Members = () => { { - openModal(member.userId); + if ( + userData?.role !== 'MEMBER' && + userData?.role !== 'GUEST' + ) { + openModal(member.userId); + } setSelectMember(member); }} > diff --git a/apps/admin(deprecated)/src/pages/Redirect/index.tsx b/apps/admin(deprecated)/src/pages/Redirect/index.tsx index a2d1205f..fef8c569 100644 --- a/apps/admin(deprecated)/src/pages/Redirect/index.tsx +++ b/apps/admin(deprecated)/src/pages/Redirect/index.tsx @@ -18,7 +18,11 @@ const Redirect = () => { useEffect(() => { if (!token) return; if (!(userData && userData.role)) return; - if (userData.role === 'LEAD' || userData.role === 'CORE') { + if ( + userData.role === 'LEAD' || + userData.role === 'CORE' || + userData.role === 'MEMBER' + ) { navigate('/certified'); } else { navigate('/');