diff --git a/apps/mobile/src/app/user/[userId]/main-setting/page.tsx b/apps/mobile/src/app/user/[userId]/main-setting/page.tsx index 3ae3eae..2800897 100644 --- a/apps/mobile/src/app/user/[userId]/main-setting/page.tsx +++ b/apps/mobile/src/app/user/[userId]/main-setting/page.tsx @@ -40,6 +40,7 @@ const MainSetting = () => { const handleDelAuth = () => { 회원탈퇴함수(undefined, { onSuccess: () => { + localStorage.removeItem('accessToken'); window.location.href = '/'; }, }); diff --git a/apps/mobile/src/shared/apis/user/queries.ts b/apps/mobile/src/shared/apis/user/queries.ts index daafd6c..0b31a4c 100644 --- a/apps/mobile/src/shared/apis/user/queries.ts +++ b/apps/mobile/src/shared/apis/user/queries.ts @@ -115,7 +115,7 @@ export const usePutSchool = () => { certificateCode, }), onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['userInfo'] }); + queryClient.invalidateQueries({ queryKey: ['user', 'userSchool'] }); }, onError: () => { alert('학교 변경에 실패했습니다.'); @@ -129,7 +129,7 @@ export const usePutRegion = () => { mutationFn: (modifyRegionName: string) => putRegion(modifyRegionName), onSuccess: () => { alert('지역이 변경되었습니다.'); - queryClient.invalidateQueries({ queryKey: ['userInfo'] }); + queryClient.invalidateQueries({ queryKey: ['user', 'userRegion'] }); }, onError: () => { alert('지역 변경에 실패했습니다.'); diff --git a/apps/web/src/shared/apis/user/queries.ts b/apps/web/src/shared/apis/user/queries.ts index daafd6c..0b31a4c 100644 --- a/apps/web/src/shared/apis/user/queries.ts +++ b/apps/web/src/shared/apis/user/queries.ts @@ -115,7 +115,7 @@ export const usePutSchool = () => { certificateCode, }), onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['userInfo'] }); + queryClient.invalidateQueries({ queryKey: ['user', 'userSchool'] }); }, onError: () => { alert('학교 변경에 실패했습니다.'); @@ -129,7 +129,7 @@ export const usePutRegion = () => { mutationFn: (modifyRegionName: string) => putRegion(modifyRegionName), onSuccess: () => { alert('지역이 변경되었습니다.'); - queryClient.invalidateQueries({ queryKey: ['userInfo'] }); + queryClient.invalidateQueries({ queryKey: ['user', 'userRegion'] }); }, onError: () => { alert('지역 변경에 실패했습니다.'); diff --git a/apps/web/src/shared/components/layout/header/header.tsx b/apps/web/src/shared/components/layout/header/header.tsx index 7a4bf89..6f8a5b0 100644 --- a/apps/web/src/shared/components/layout/header/header.tsx +++ b/apps/web/src/shared/components/layout/header/header.tsx @@ -39,11 +39,6 @@ const Header = () => { ); }; - console.log(navigator.userAgent, isMobile(), window.location.hostname); - console.log( - `https://m.rankit.run${window.location.pathname}${window.location.search}`, - ); - if (isMobile() && window.location.hostname === 'www.rankit.run') { const newUrl = `https://m.rankit.run${window.location.pathname}${window.location.search}`; window.location.replace(newUrl); diff --git a/apps/web/src/shared/components/modalContentMainSetting/modalContentMainSetting.tsx b/apps/web/src/shared/components/modalContentMainSetting/modalContentMainSetting.tsx index 232bb23..6311630 100644 --- a/apps/web/src/shared/components/modalContentMainSetting/modalContentMainSetting.tsx +++ b/apps/web/src/shared/components/modalContentMainSetting/modalContentMainSetting.tsx @@ -32,6 +32,7 @@ export function ModalContentMainSetting() { const handleDelAuth = () => { 회원탈퇴함수(undefined, { onSuccess: () => { + localStorage.removeItem('accessToken'); window.location.href = '/'; }, });