diff --git a/frontend/src/components/AdminMenuSidebar/index.tsx b/frontend/src/components/AdminMenuSidebar/index.tsx index 21b5e39..26c7233 100644 --- a/frontend/src/components/AdminMenuSidebar/index.tsx +++ b/frontend/src/components/AdminMenuSidebar/index.tsx @@ -6,10 +6,6 @@ export default function AdminMenuSidebar() { const { workspaceId, projectId } = useParams<{ workspaceId: string; projectId?: string }>(); const menuItems = [ - { - label: '리뷰', - path: projectId ? `/admin/${workspaceId}/reviews/${projectId}` : `/admin/${workspaceId}/reviews`, - }, { label: '멤버 관리', path: projectId ? `/admin/${workspaceId}/members/${projectId}` : `/admin/${workspaceId}/members`, diff --git a/frontend/src/components/AdminProjectSidebar/index.tsx b/frontend/src/components/AdminProjectSidebar/index.tsx index 6d36739..5dc834a 100644 --- a/frontend/src/components/AdminProjectSidebar/index.tsx +++ b/frontend/src/components/AdminProjectSidebar/index.tsx @@ -2,11 +2,8 @@ import { ResizablePanel, ResizableHandle } from '../ui/resizable'; import { Link, useLocation, useParams } from 'react-router-dom'; import { SquarePen } from 'lucide-react'; import useProjectListQuery from '@/queries/projects/useProjectListQuery'; -import useCreateProjectQuery from '@/queries/projects/useCreateProjectQuery'; import useWorkspaceQuery from '@/queries/workspaces/useWorkspaceQuery'; -import { ProjectRequest } from '@/types'; import useAuthStore from '@/stores/useAuthStore'; -import ProjectCreateModal from '../ProjectCreateModal'; import { cn } from '@/lib/utils'; export default function AdminProjectSidebar(): JSX.Element { @@ -20,20 +17,7 @@ export default function AdminProjectSidebar(): JSX.Element { const { data: projects } = useProjectListQuery(Number(workspaceId), memberId); - const createProject = useCreateProjectQuery(); - - const handleCreateProject = (data: ProjectRequest) => { - createProject.mutate({ - workspaceId: Number(workspaceId), - memberId, - data, - }); - }; - const getNewPath = (newProjectId: string) => { - if (location.pathname.includes('reviews')) { - return `/admin/${workspaceId}/reviews/${newProjectId}`; - } if (location.pathname.includes('members')) { return `/admin/${workspaceId}/members/${newProjectId}`; } @@ -64,10 +48,6 @@ export default function AdminProjectSidebar(): JSX.Element { -
{projects.map((project) => { diff --git a/frontend/src/components/Header/WorkspaceNavigation.tsx b/frontend/src/components/Header/WorkspaceNavigation.tsx index 7015910..58ae2e2 100644 --- a/frontend/src/components/Header/WorkspaceNavigation.tsx +++ b/frontend/src/components/Header/WorkspaceNavigation.tsx @@ -1,9 +1,15 @@ import { cn } from '@/lib/utils'; -import { Link, useParams } from 'react-router-dom'; +import { Link, useLocation, useParams } from 'react-router-dom'; import useAuthStore from '@/stores/useAuthStore'; import useWorkspaceListQuery from '@/queries/workspaces/useWorkspaceListQuery'; export default function WorkspaceNavigation() { + const location = useLocation(); + const isBrowsePage = location.pathname.startsWith('/browse'); + const isWorkspacePage = location.pathname.startsWith('/workspace'); + const isReviewPage = location.pathname.startsWith('/review'); + const isAdminPage = location.pathname.startsWith('/admin'); + const { workspaceId } = useParams<{ workspaceId: string }>(); const profile = useAuthStore((state) => state.profile); const memberId = profile?.id; @@ -21,7 +27,7 @@ export default function WorkspaceNavigation() {