Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

NoProjectsHero.tsx

36 lines1.4 KB

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 bg-background text-foreground">
14 <div className="flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-background">
15 <Empty className="flex-1">
16 <div className="w-full max-w-lg px-8 py-12">
17 <EmptyHeader className="max-w-none">
18 <EmptyTitle className="text-foreground text-2xl sm:text-3xl">
19 What should we work on?
20 </EmptyTitle>
21 <EmptyDescription className="mt-2 text-sm text-muted-foreground/78">
22 Add a project to start your first thread.
23 </EmptyDescription>
24 <div className="mt-6 flex justify-center">
25 <Button size="sm" onClick={openAddProject}>
26 <PlusIcon className="size-4" />
27 Add project
28 </Button>
29 </div>
30 </EmptyHeader>
31 </div>
32 </Empty>
33 </div>
34 </SidebarInset>
35 );