From 63aad693a3cf2bafeedd9e8df2fd416aaed39711 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 19 Oct 2025 21:50:40 +0000 Subject: [PATCH] Show project name and breadcrumb on Project Board and set SEO title accordingly cgen-ba2cadfb5a024dbaa146c6a31747dab8 --- client/pages/ProjectBoard.tsx | 47 ++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/client/pages/ProjectBoard.tsx b/client/pages/ProjectBoard.tsx index c78c12e6..8ad2383c 100644 --- a/client/pages/ProjectBoard.tsx +++ b/client/pages/ProjectBoard.tsx @@ -1,7 +1,7 @@ import Layout from "@/components/Layout"; import { useAuth } from "@/contexts/AuthContext"; import { useEffect, useMemo, useState } from "react"; -import { useNavigate, useParams } from "react-router-dom"; +import { Link, useNavigate, useParams } from "react-router-dom"; import { Card, CardHeader, @@ -20,9 +20,11 @@ import { SelectValue, } from "@/components/ui/select"; import { Badge } from "@/components/ui/badge"; +import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@/components/ui/breadcrumb"; import { aethexCollabService } from "@/lib/aethex-collab-service"; import LoadingScreen from "@/components/LoadingScreen"; import SEO from "@/components/SEO"; +import { supabase } from "@/lib/supabase"; const columns: { key: "todo" | "doing" | "done" | "blocked"; @@ -41,6 +43,7 @@ export default function ProjectBoard() { const { projectId } = useParams<{ projectId: string }>(); const [isLoading, setIsLoading] = useState(true); const [tasks, setTasks] = useState([]); + const [projectName, setProjectName] = useState(""); const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); const [creating, setCreating] = useState(false); @@ -55,6 +58,18 @@ export default function ProjectBoard() { if (!loading && !user) navigate("/login", { replace: true }); }, [loading, user, navigate]); + const loadProject = async () => { + if (!projectId) return; + try { + const { data } = await supabase + .from("projects") + .select("id,name,slug") + .eq("id", projectId) + .maybeSingle(); + setProjectName((data as any)?.name || ""); + } catch {} + }; + const load = async () => { if (!projectId) return; setIsLoading(true); @@ -69,6 +84,7 @@ export default function ProjectBoard() { }; useEffect(() => { + loadProject(); load(); }, [projectId]); @@ -141,7 +157,7 @@ export default function ProjectBoard() { return ( <>
+ + + + + Projects + + + + + {projectName ? ( + + {projectName} + + ) : ( + + Project + + )} + + + + Board + + +

- Project Board + {projectName || "Project Board"}

Track tasks by status. Filters, assignees, and due dates