diff --git a/frontend/src/components/Header/index.tsx b/frontend/src/components/Header/index.tsx index ff2f537..0375839 100644 --- a/frontend/src/components/Header/index.tsx +++ b/frontend/src/components/Header/index.tsx @@ -1,12 +1,14 @@ import * as React from 'react'; import { cn } from '@/lib/utils'; import { Bell, User } from 'lucide-react'; -import { useLocation, Link } from 'react-router-dom'; +import { useLocation, Link, useParams } from 'react-router-dom'; export interface HeaderProps extends React.HTMLAttributes {} export default function Header({ className, ...props }: HeaderProps) { const location = useLocation(); + const { workspaceId } = useParams<{ workspaceId: string }>(); + const isWorkspaceIdNaN = isNaN(Number(workspaceId)); const isHomePage = location.pathname === '/'; @@ -30,23 +32,27 @@ export default function Header({ className, ...props }: HeaderProps) { {!isHomePage && ( )} diff --git a/frontend/src/components/ProjectCreateModal/index.tsx b/frontend/src/components/ProjectCreateModal/index.tsx index dd48044..3ed7cf9 100644 --- a/frontend/src/components/ProjectCreateModal/index.tsx +++ b/frontend/src/components/ProjectCreateModal/index.tsx @@ -6,9 +6,10 @@ import { Plus } from 'lucide-react'; interface ProjectCreateModalProps { onSubmit: (data: { title: string; labelType: 'classification' | 'detection' | 'segmentation' }) => void; + buttonClass?: string; } -export default function ProjectCreateModal({ onSubmit }: ProjectCreateModalProps) { +export default function ProjectCreateModal({ onSubmit, buttonClass = '' }: ProjectCreateModalProps) { const [isOpen, setIsOpen] = React.useState(false); const handleOpen = () => setIsOpen(true); @@ -35,7 +36,7 @@ export default function ProjectCreateModal({ onSubmit }: ProjectCreateModalProps