Open History to see the last commit
1import { PlusIcon } from "lucide-react";
2import { useCallback } from "react";
3
4import { openCommandPalette } from "../commandPaletteBus";
5import { Button } from "./ui/button";
6import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "./ui/empty";
7import { SidebarInset } from "./ui/sidebar";
8
9export function NoProjectsHero() {
10 const openAddProject = useCallback(() => openCommandPalette({ open: "add-project" }), []);
11
12 return (
13 <SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">
14 <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
15 <Empty size="hero" className="flex-1">
16 <div className="w-full max-w-lg px-8 py-12">
17 <EmptyHeader className="max-w-none">
18 <EmptyTitle>What should we work on?</EmptyTitle>
19 <EmptyDescription>Add a project to start your first thread.</EmptyDescription>
20 <div className="mt-6 flex justify-center">
21 <Button size="sm" onClick={openAddProject}>
22 <PlusIcon className="size-4" />
23 Add project
24 </Button>
25 </div>
26 </EmptyHeader>
27 </div>
28 </Empty>
29 </div>
30 </SidebarInset>
31 );
32}