diff --git a/frontend/.storybook/preview.tsx b/frontend/.storybook/preview.tsx
index 9364210..7df26fa 100644
--- a/frontend/.storybook/preview.tsx
+++ b/frontend/.storybook/preview.tsx
@@ -1,11 +1,9 @@
-// .storybook/preview.ts
import React from 'react';
import type { Preview } from '@storybook/react';
import { MemoryRouter } from 'react-router-dom';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import '../src/index.css';
-// QueryClient 생성
const queryClient = new QueryClient();
const preview: Preview = {
diff --git a/frontend/src/components/AdminLayout/index.tsx b/frontend/src/components/AdminLayout/index.tsx
index 39e24cb..012f841 100644
--- a/frontend/src/components/AdminLayout/index.tsx
+++ b/frontend/src/components/AdminLayout/index.tsx
@@ -1,4 +1,5 @@
import { Outlet } from 'react-router-dom';
+import { useParams } from 'react-router-dom';
import Header from '../Header';
import { ResizablePanelGroup, ResizablePanel } from '../ui/resizable';
import AdminProjectSidebar from '../AdminProjectSidebar';
@@ -6,18 +7,59 @@ import AdminMenuSidebar from '../AdminMenuSidebar';
import { Workspace } from '@/types';
interface AdminLayoutProps {
- workspace: Workspace;
+ workspace?: Workspace;
}
export default function AdminLayout({ workspace }: AdminLayoutProps) {
+ const { workspaceId } = useParams<{ workspaceId: string }>();
+
+ const numericWorkspaceId = workspaceId ? parseInt(workspaceId, 10) : 0;
+
+ const effectiveWorkspace: Workspace = workspace || {
+ id: numericWorkspaceId,
+ name: workspaceId ? `workspace-${workspaceId}` : 'default-workspace',
+ projects: [
+ {
+ id: 1,
+ name: 'project1',
+ type: 'Detection',
+ children: [],
+ },
+ {
+ id: 2,
+ name: 'project2',
+ type: 'Detection',
+ children: [],
+ },
+ {
+ id: 3,
+ name: 'project3',
+ type: 'Detection',
+ children: [],
+ },
+ {
+ id: 4,
+ name: 'project4',
+ type: 'Detection',
+ children: [],
+ },
+ {
+ id: 5,
+ name: 'project5',
+ type: 'Detection',
+ children: [],
+ },
+ ],
+ };
+
return (
<>