'use client'; import { useState } from 'react'; import Link from 'next/link'; import { Plus, Loader2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { useProjects } from '@/lib/hooks/use-projects'; import { CreateProjectDialog } from '@/components/features/projects/CreateProjectDialog'; export default function ProjectsPage() { const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false); const { data: projects, isLoading, error } = useProjects(); // Log state for debugging console.log('[ProjectsPage] State:', { isLoading, error, projects, apiUrl: process.env.NEXT_PUBLIC_API_URL, }); if (isLoading) { return (
Error Details:
{errorMessage}
API URL:
{apiUrl}
Troubleshooting Steps:
Manage your projects and track progress
{project.description}
No projects yet. Create your first project to get started.