diff --git a/src/components/sidebar/ListSetting.tsx b/src/components/sidebar/ListSetting.tsx
index d5d8ab67..efba61c3 100644
--- a/src/components/sidebar/ListSetting.tsx
+++ b/src/components/sidebar/ListSetting.tsx
@@ -1,4 +1,4 @@
-import { NavLink, useParams } from 'react-router-dom';
+import { NavLink } from 'react-router-dom';
type ListSettingProps = {
navList: {
@@ -8,24 +8,20 @@ type ListSettingProps = {
};
export default function ListSetting({ navList }: ListSettingProps) {
- const { teamId } = useParams();
return (
- {navList.map((item) => {
- const routePath = item.route.includes(':teamId') ? item.route.replace(':teamId', teamId!) : item.route;
- return (
- -
-
- `flex h-30 flex-col justify-center border-l-4 px-10 ${isActive ? 'border-l-main' : 'border-l-transparent'}`
- }
- >
- {item.label}
-
-
- );
- })}
+ {navList.map((item) => (
+ -
+
+ `flex h-30 flex-col justify-center border-l-4 px-10 ${isActive ? 'border-l-main' : 'border-l-transparent'}`
+ }
+ >
+ {item.label}
+
+
+ ))}
);
}
diff --git a/src/layouts/page/SettingLayout.tsx b/src/layouts/page/SettingLayout.tsx
index d2beb4df..f07cdc7a 100644
--- a/src/layouts/page/SettingLayout.tsx
+++ b/src/layouts/page/SettingLayout.tsx
@@ -14,7 +14,7 @@ const navList = [
},
{
label: 'My Teams',
- route: 'team/:teamId',
+ route: 'teams',
},
];
@@ -23,9 +23,8 @@ export default function SettingLayout() {
const getTitle = () => {
const currentPath = location.pathname.split('/').slice(-1)[0];
- const currentNavItem = navList.find((item) =>
- item.route.includes(':teamId') && location.pathname.includes('team') ? 'My Teams' : item.route === currentPath,
- );
+ const currentNavItem = navList.find((item) => item.route === currentPath);
+
return currentNavItem ? currentNavItem.label : '이메일 인증';
};
@@ -41,7 +40,7 @@ export default function SettingLayout() {
diff --git a/src/routes/MainRouter.tsx b/src/routes/MainRouter.tsx
index 372d9c23..d3f4efe3 100644
--- a/src/routes/MainRouter.tsx
+++ b/src/routes/MainRouter.tsx
@@ -62,7 +62,7 @@ export default function MainRouter() {
{ path: 'auth', element: },
{ path: 'user', element: },
{ path: 'password', element: },
- { path: 'team/:teamId', element: },
+ { path: 'teams', element: },
],
},
{