'use client'; import { use } from 'react'; import Link from 'next/link'; import { ArrowLeft, Loader2, KanbanSquare } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { useProject } from '@/lib/hooks/use-projects'; interface ProjectDetailPageProps { params: Promise<{ id: string }>; } export default function ProjectDetailPage({ params }: ProjectDetailPageProps) { const { id } = use(params); const { data: project, isLoading, error } = useProject(id); if (isLoading) { return (
); } if (error || !project) { return (

Project not found or failed to load.

); } return (

{project.name}

{project.status}

Key: {project.key}

Project Details Information about this project

Description

{project.description || 'No description provided'}

Created

{new Date(project.createdAt).toLocaleDateString()}

{project.updatedAt && (

Last Updated

{new Date(project.updatedAt).toLocaleDateString()}

)}
); }