diff --git a/frontend/src/components/ProjectCard/index.tsx b/frontend/src/components/ProjectCard/index.tsx index b8b6325..f05f38a 100644 --- a/frontend/src/components/ProjectCard/index.tsx +++ b/frontend/src/components/ProjectCard/index.tsx @@ -1,16 +1,17 @@ import { Compass } from 'lucide-react'; +import { Link } from 'react-router-dom'; interface ProjectCardProps { title: string; description: string; + to?: string; imageUrl?: string; - onClick?: () => void; } -export default function ProjectCard({ title, description, imageUrl, onClick }: ProjectCardProps): JSX.Element { +export default function ProjectCard({ title, description, imageUrl = '', to = '' }: ProjectCardProps): JSX.Element { return ( -
@@ -28,6 +29,6 @@ export default function ProjectCard({ title, description, imageUrl, onClick }: P
{title}
{description}
-
+ ); } diff --git a/frontend/src/components/WorkspaceSidebar/index.tsx b/frontend/src/components/WorkspaceSidebar/index.tsx index 5445aa5..57431b4 100644 --- a/frontend/src/components/WorkspaceSidebar/index.tsx +++ b/frontend/src/components/WorkspaceSidebar/index.tsx @@ -17,7 +17,7 @@ export default function WorkspaceSidebar({ workspaceName, projects }: { workspac // const [selectedProjectId, setSelectedProjectId] = useState(); const handleSelectProject = (projectId: string) => { // setSelectedProjectId(projectId); - navigate(`${webPath.workspace()}/${workspaceId}/project/${projectId}`); + navigate(`${webPath.workspace()}/${workspaceId}/${projectId}`); }; return ( diff --git a/frontend/src/pages/WorkspaceBrowseDetail.tsx b/frontend/src/pages/WorkspaceBrowseDetail.tsx index cbe75f6..328a44b 100644 --- a/frontend/src/pages/WorkspaceBrowseDetail.tsx +++ b/frontend/src/pages/WorkspaceBrowseDetail.tsx @@ -113,10 +113,8 @@ function ProjectList({ { - navigate(`${webPath.workspace()}/${workspaceId}/project/${project.id}`); - }} /> ))} diff --git a/frontend/src/router/index.tsx b/frontend/src/router/index.tsx index 06a5231..7b33116 100644 --- a/frontend/src/router/index.tsx +++ b/frontend/src/router/index.tsx @@ -67,7 +67,7 @@ const router = createBrowserRouter([ element: , }, { - path: 'project/:projectId', + path: ':projectId', element: , }, ],