diff --git a/src/components/Projects/ProjectTabs.tsx b/src/components/Projects/ProjectTabs.tsx index 1c7350b07..62d5141e3 100644 --- a/src/components/Projects/ProjectTabs.tsx +++ b/src/components/Projects/ProjectTabs.tsx @@ -1,13 +1,5 @@ import { cn } from '../../lib/classname'; -import { - ArrowLeft, - Blocks, - BoxSelect, - type LucideIcon, - StepBackIcon, - StickyNote, - Text, -} from 'lucide-react'; +import { ArrowLeft, Blocks, type LucideIcon, Text } from 'lucide-react'; export const allowedProjectTabs = ['details', 'solutions'] as const; export type AllowedProjectTab = (typeof allowedProjectTabs)[number]; @@ -53,15 +45,20 @@ export function ProjectTabs(props: ProjectTabsProps) { return (
- { + if (window.history.length > 1) { + window.history.back(); + return; + } + + window.location.href = `/${parentRoadmapId}/projects`; + }} + className="-ml-1.5 flex items-center rounded-md bg-gray-300 px-2 py-1.5 text-xs tracking-wide text-black hover:bg-gray-400/60" > Back to Projects - +
- +