fix(web): break circular links in DegradedProjectState
Both "Back to project" and "Open dashboard view" linked to
projectDashboardPath(projectId) — the same page the component is
rendered on. Replace with working navigation:
- "Back to project" → "/" (global dashboard)
- "Open dashboard view" → "/projects/{id}/settings" (edit config)
Fixes #1867
This commit is contained in:
parent
1e80d46738
commit
20fb5a2237
|
|
@ -1,5 +1,5 @@
|
|||
import Link from "next/link";
|
||||
import { projectDashboardPath } from "@/lib/routes";
|
||||
|
||||
import { RepairDegradedProjectButton } from "./RepairDegradedProjectButton";
|
||||
|
||||
interface DegradedProjectStateProps {
|
||||
|
|
@ -61,16 +61,16 @@ export function DegradedProjectState({
|
|||
|
||||
<div className="mt-6 flex flex-wrap gap-3">
|
||||
<Link
|
||||
href={projectDashboardPath(projectId)}
|
||||
href="/"
|
||||
className="rounded-lg border border-[var(--color-border-default)] px-4 py-2 text-sm font-medium text-[var(--color-text-secondary)] transition-colors hover:bg-[var(--color-bg-elevated-hover)]"
|
||||
>
|
||||
Back to project
|
||||
Back to dashboard
|
||||
</Link>
|
||||
<Link
|
||||
href={projectDashboardPath(projectId)}
|
||||
href={`/projects/${encodeURIComponent(projectId)}/settings`}
|
||||
className="rounded-lg border border-[var(--color-border-default)] px-4 py-2 text-sm font-medium text-[var(--color-text-secondary)] transition-colors hover:bg-[var(--color-bg-elevated-hover)]"
|
||||
>
|
||||
Open dashboard view
|
||||
Edit settings
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue