diff --git a/api/my/groups/index.ts b/api/my/groups/index.ts
index 7ba0ed6a..a5bc7c1b 100644
--- a/api/my/groups/index.ts
+++ b/api/my/groups/index.ts
@@ -31,18 +31,18 @@ export default class MyFamilyApi {
}
async myFamilyDelete() {
- return axiosInstance.delete(`/my/groups`);
+ return await axiosInstance.delete(`/my/groups`);
}
async myFamilyModify(formData: NameModifyType) {
- return axiosInstance.put(`/my/groups`, formData);
+ return await axiosInstance.put(`/my/groups`, formData);
}
async myFamilyAddMember(formData: FieldValues) {
- return axiosInstance.post(`/my/groups/members`, formData);
+ return await axiosInstance.post(`/my/groups/members`, formData);
}
async myFamilyDeleteMember(targetId: number) {
- return axiosInstance.post(`/my/groups/members/${targetId}`);
+ return await axiosInstance.post(`/my/groups/members/${targetId}`);
}
}
diff --git a/components/common/nav/nav-list/nav-list-item.tsx b/components/common/nav/nav-list/nav-list-item.tsx
index 6548c12a..c588f802 100644
--- a/components/common/nav/nav-list/nav-list-item.tsx
+++ b/components/common/nav/nav-list/nav-list-item.tsx
@@ -5,8 +5,9 @@ import { NavListProps } from '../types/nav';
export default function NavListItem({ href, text, RenderSvgComponent }: NavListProps) {
const { pathname } = useRouter();
+ console.log(pathname, href);
return (
-
+
diff --git a/components/mypage/family/family-util-buttons/family-delete-button/delete-modal/delete-modal.tsx b/components/mypage/family/family-util-buttons/family-delete-button/delete-modal/delete-modal.tsx
index 0ba9bc16..2b29b89a 100644
--- a/components/mypage/family/family-util-buttons/family-delete-button/delete-modal/delete-modal.tsx
+++ b/components/mypage/family/family-util-buttons/family-delete-button/delete-modal/delete-modal.tsx
@@ -21,7 +21,7 @@ export default function DeleteModal({ Modal, handleModal }: DeleteModalType) {
await myFamilyApi.myFamilyDelete();
deleteCookie('accessToken');
deleteCookie('refreshToken');
- router.push('/login');
+ router.push('/');
} catch {
console.log('에러');
}
diff --git a/pages/mypage/family/index.module.scss b/pages/mypage/family-management/index.module.scss
similarity index 100%
rename from pages/mypage/family/index.module.scss
rename to pages/mypage/family-management/index.module.scss
diff --git a/pages/mypage/family/index.tsx b/pages/mypage/family-management/index.tsx
similarity index 100%
rename from pages/mypage/family/index.tsx
rename to pages/mypage/family-management/index.tsx
diff --git a/utils/is-nav.ts b/utils/is-nav.ts
index 48d17d2a..ae23c48b 100644
--- a/utils/is-nav.ts
+++ b/utils/is-nav.ts
@@ -1,7 +1,15 @@
import { NextRouter } from 'next/router';
export const isNav = (router: NextRouter) => {
- const navPaths = ['/calendar', '/family', '/diaries', '/growth', '/story'];
- console.log(navPaths.some((path) => router.pathname === path));
+ const navPaths = [
+ '/calendar',
+ '/family',
+ '/diaries',
+ '/growth',
+ '/story',
+ '/mypage',
+ '/mypage/pet',
+ '/mypage/family-management',
+ ];
return navPaths.some((path) => router.pathname === path);
};