This commit is contained in:
2026-05-14 19:24:50 +00:00
parent af0628867f
commit a7f218e182
63 changed files with 10539 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { useState } from 'react';
import { Button } from '@/components/ui/button';
import { AddProjectModal } from '@/components/AddProjectModal';
import { useProjects } from '@/hooks/useProjects';
export function Home() {
const { projects, refresh } = useProjects();
const [open, setOpen] = useState(false);
const empty = projects && projects.length === 0;
return (
<div className="flex-1 flex items-center justify-center px-6">
<div className="max-w-md text-center space-y-4">
{empty ? (
<>
<h1 className="text-2xl font-semibold tracking-tight">No projects yet</h1>
<p className="text-sm text-muted-foreground">
Add a project from /opt to start chatting about its code.
</p>
<Button onClick={() => setOpen(true)}>Add project</Button>
</>
) : (
<>
<h1 className="text-2xl font-semibold tracking-tight">BooCode</h1>
<p className="text-sm text-muted-foreground">
Pick a project from the sidebar.
</p>
</>
)}
</div>
<AddProjectModal open={open} onOpenChange={setOpen} onAdded={refresh} />
</div>
);
}