Feat: 모델 관련 경로 추가

This commit is contained in:
정현조 2024-09-23 12:08:49 +09:00
parent a2e9d23e85
commit 525cf599ec
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,5 @@
import { Link, useLocation, useParams } from 'react-router-dom';
import { cn } from '@/lib/utils';
export default function AdminMenuSidebar() {
const location = useLocation();
const { workspaceId } = useParams<{ workspaceId: string }>();
@ -14,6 +13,10 @@ export default function AdminMenuSidebar() {
label: '멤버 관리',
path: `/admin/${workspaceId}/members`,
},
{
label: '모델 관리',
path: `/admin/${workspaceId}/models`,
},
];
return (

View File

@ -8,7 +8,6 @@ import { ProjectRequest } from '@/types';
import useAuthStore from '@/stores/useAuthStore';
import ProjectCreateModal from '../ProjectCreateModal';
import { cn } from '@/lib/utils';
export default function AdminProjectSidebar(): JSX.Element {
const location = useLocation();
const navigate = useNavigate();
@ -46,6 +45,9 @@ export default function AdminProjectSidebar(): JSX.Element {
if (location.pathname.includes('members')) {
return `/admin/${workspaceId}/members/${newProjectId}`;
}
if (location.pathname.includes('models')) {
return `/admin/${workspaceId}/models/${newProjectId}`;
}
return location.pathname;
};