@@ -6,6 +6,7 @@ import { useNavigate } from "react-router-dom";
66import TermsAndPrivacyModal from "@/components/modal/TermsAndPrivacyModal" ;
77import { trackEvent } from "@/libs/analytics" ;
88import { deleteUser } from "@/api/user" ;
9+ import Error from "@/pages/Error" ;
910
1011type ModalType = "logout" | "withdraw" | "terms" | "privacy" | null ;
1112
@@ -26,7 +27,7 @@ const alertConfig = {
2627
2728const MyInfo = ( ) => {
2829 const [ modalType , setModalType ] = useState < ModalType > ( null ) ;
29- const { logout } = useAuthStore ( ) ;
30+ const { logout, isLoggedIn } = useAuthStore ( ) ;
3031 const navigate = useNavigate ( ) ;
3132
3233 const handleCancel = ( ) => {
@@ -60,12 +61,16 @@ const MyInfo = () => {
6061 } ;
6162
6263 const menuItems = [
63- { label : "이용약관" , onClick : ( ) => setModalType ( "terms" ) } , //TODO: 이용약관 팝업 구현 시 추가 필요
64- { label : "개인정보처리방침" , onClick : ( ) => setModalType ( "privacy" ) } , //TODO: 개인정보처리방침 팝업 구현 시 추가 필요
64+ { label : "이용약관" , onClick : ( ) => setModalType ( "terms" ) } ,
65+ { label : "개인정보처리방침" , onClick : ( ) => setModalType ( "privacy" ) } ,
6566 { label : "로그아웃" , onClick : ( ) => setModalType ( "logout" ) } ,
6667 { label : "회원탈퇴" , onClick : ( ) => setModalType ( "withdraw" ) }
6768 ] ;
6869
70+ if ( ! isLoggedIn ) {
71+ return < Error statusCode = "401" /> ;
72+ }
73+
6974 return (
7075 < div className = "relative flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]" >
7176 < Header title = "내 정보" showShareIcon = { false } />
0 commit comments