The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 06:45 UTC
perf(web): the no-projects hero compiles without manual memoization (#20589)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 22:03 UTC
d15f208cdeafdd81585f19e7e05d52979ef74842
1 file changed
+1
-3
apps/web/src/components/NoProjectsHero.tsx
+1
-3
@@ -1,5 +1,4 @@
1
import { MessageSquareDashedIcon, PlusIcon } from "lucide-react";
2
-import { useCallback } from "react";
2
3
import { openCommandPalette } from "../commandPaletteBus";
4
import { isElectron } from "../env";
@@ -11,7 +10,6 @@ import { SidebarInset } from "./ui/sidebar";
10
import { WorkspacePageHeader } from "./WorkspacePageHeader";
11
12
export function NoProjectsHero() {
14
- const openAddProject = useCallback(() => openCommandPalette({ open: "add-project" }), []);
13
const primaryEnvironmentId = usePrimaryEnvironmentId();
14
const { scratchEnvironmentId, startScratchThread } = useScratchProject();
15
const scratchTargetEnvironmentId = scratchEnvironmentId(primaryEnvironmentId);
@@ -31,7 +29,7 @@ export function NoProjectsHero() {
29
: "Add a project, or start without one."}
30
</EmptyDescription>
31
<div className="mt-6 flex justify-center gap-2">
34
- <Button size="sm" onClick={openAddProject}>
32
+ <Button size="sm" onClick={() => openCommandPalette({ open: "add-project" })}>
33
<PlusIcon className="size-4" />
34
Add project
35
</Button>