File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { NavBar } from "@/components/nav-bar" ;
2+ import { Toolbar } from "@/components/toolbar" ;
13import { Spreadsheet } from "@/components/spreadsheet" ;
2- import { ThemeToggle } from "@/components/theme-toggle" ;
34import { createServiceClient } from "@/lib/supabase/server" ;
45import type { Company } from "@/lib/supabase/types" ;
56
@@ -14,46 +15,8 @@ export default async function Home() {
1415
1516 return (
1617 < main className = "min-h-screen flex flex-col" >
17- { /* Header */ }
18- < header className = "shrink-0 px-6 py-4 border-b border-border flex items-center justify-between" >
19- < div >
20- < h1 className = "text-lg font-semibold tracking-tight" >
21- Smart Spreadsheet
22- </ h1 >
23- < p className = "text-xs text-muted-foreground" >
24- Company enrichment powered by{ " " }
25- < a
26- href = "https://trigger.dev"
27- target = "_blank"
28- rel = "noopener noreferrer"
29- className = "text-blue-400 hover:underline"
30- >
31- Trigger.dev
32- </ a >
33- ,{ " " }
34- < a
35- href = "https://exa.ai"
36- target = "_blank"
37- rel = "noopener noreferrer"
38- className = "text-blue-400 hover:underline"
39- >
40- Exa
41- </ a > { " " }
42- and{ " " }
43- < a
44- href = "https://anthropic.com"
45- target = "_blank"
46- rel = "noopener noreferrer"
47- className = "text-blue-400 hover:underline"
48- >
49- Claude
50- </ a >
51- </ p >
52- </ div >
53- < ThemeToggle />
54- </ header >
55-
56- { /* Spreadsheet - takes remaining space */ }
18+ < NavBar />
19+ < Toolbar />
5720 < div className = "flex-1 overflow-hidden" >
5821 < Spreadsheet initialCompanies = { initialCompanies } />
5922 </ div >
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { Table2 } from "lucide-react" ;
4+ import { ThemeToggle } from "@/components/theme-toggle" ;
5+
6+ const navItems = [ "Home" , "Companies" , "Reports" ] ;
7+
8+ export function NavBar ( ) {
9+ return (
10+ < nav className = "shrink-0 h-14 px-4 border-b border-border flex items-center justify-between bg-background" >
11+ { /* Left: Logo + Title + Nav Tabs */ }
12+ < div className = "flex items-center gap-6" >
13+ < div className = "flex items-center gap-2" >
14+ < Table2 className = "h-5 w-5 text-primary" />
15+ < span className = "font-semibold text-sm tracking-tight" >
16+ Smart Spreadsheet
17+ </ span >
18+ </ div >
19+ < div className = "flex items-center gap-1" >
20+ { navItems . map ( ( label ) => (
21+ < button
22+ key = { label }
23+ className = "px-3 py-1.5 text-sm rounded-md transition-colors text-foreground hover:bg-muted/50"
24+ >
25+ { label }
26+ </ button >
27+ ) ) }
28+ </ div >
29+ </ div >
30+
31+ { /* Right: Theme Toggle + Avatar */ }
32+ < div className = "flex items-center gap-2" >
33+ < ThemeToggle />
34+ < div className = "h-8 w-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center text-xs font-medium" >
35+ DS
36+ </ div >
37+ </ div >
38+ </ nav >
39+ ) ;
40+ }
Original file line number Diff line number Diff line change 1+ import {
2+ Bold ,
3+ Italic ,
4+ Underline ,
5+ AlignLeft ,
6+ AlignCenter ,
7+ AlignRight ,
8+ DollarSign ,
9+ Percent ,
10+ Paintbrush ,
11+ Filter ,
12+ MoreHorizontal ,
13+ } from "lucide-react" ;
14+ import { Button } from "@/components/ui/button" ;
15+
16+ function ToolbarDivider ( ) {
17+ return < div className = "w-px h-5 bg-border mx-1" /> ;
18+ }
19+
20+ function ToolbarButton ( { children } : { children : React . ReactNode } ) {
21+ return (
22+ < Button
23+ variant = "ghost"
24+ size = "icon"
25+ className = "h-7 w-7 text-muted-foreground hover:text-foreground"
26+ >
27+ { children }
28+ </ Button >
29+ ) ;
30+ }
31+
32+ export function Toolbar ( ) {
33+ return (
34+ < div className = "shrink-0 h-10 px-4 border-b border-border flex items-center gap-0.5 bg-background" >
35+ { /* Text formatting */ }
36+ < ToolbarButton >
37+ < Bold className = "h-4 w-4" />
38+ </ ToolbarButton >
39+ < ToolbarButton >
40+ < Italic className = "h-4 w-4" />
41+ </ ToolbarButton >
42+ < ToolbarButton >
43+ < Underline className = "h-4 w-4" />
44+ </ ToolbarButton >
45+
46+ < ToolbarDivider />
47+
48+ { /* Alignment */ }
49+ < ToolbarButton >
50+ < AlignLeft className = "h-4 w-4" />
51+ </ ToolbarButton >
52+ < ToolbarButton >
53+ < AlignCenter className = "h-4 w-4" />
54+ </ ToolbarButton >
55+ < ToolbarButton >
56+ < AlignRight className = "h-4 w-4" />
57+ </ ToolbarButton >
58+
59+ < ToolbarDivider />
60+
61+ { /* Number formatting */ }
62+ < ToolbarButton >
63+ < DollarSign className = "h-4 w-4" />
64+ </ ToolbarButton >
65+ < ToolbarButton >
66+ < Percent className = "h-4 w-4" />
67+ </ ToolbarButton >
68+
69+ < ToolbarDivider />
70+
71+ { /* Other tools */ }
72+ < ToolbarButton >
73+ < Paintbrush className = "h-4 w-4" />
74+ </ ToolbarButton >
75+ < ToolbarButton >
76+ < Filter className = "h-4 w-4" />
77+ </ ToolbarButton >
78+ < ToolbarButton >
79+ < MoreHorizontal className = "h-4 w-4" />
80+ </ ToolbarButton >
81+ </ div >
82+ ) ;
83+ }
Original file line number Diff line number Diff line change 1- import { task , metadata } from "@trigger.dev/sdk" ;
1+ import { metadata , task } from "@trigger.dev/sdk" ;
22import Exa from "exa-js" ;
33import { generateText , Output } from "ai" ;
44import { anthropic } from "@ai-sdk/anthropic" ;
@@ -26,7 +26,6 @@ export const getEmployeeCount = task({
2626 retry : { maxAttempts : 2 } ,
2727 run : async ( {
2828 companyName,
29- companyUrl,
3029 } : {
3130 companyName : string ;
3231 companyUrl ?: string | null ;
@@ -39,15 +38,16 @@ export const getEmployeeCount = task({
3938 numResults : 3 ,
4039 text : { maxCharacters : 1500 } ,
4140 type : "auto" ,
42- }
41+ } ,
4342 ) ;
4443
4544 // Get the best source URL
4645 const sourceUrl = results . results [ 0 ] ?. url ?? null ;
4746
4847 const { output } = await generateText ( {
4948 model : anthropic ( "claude-sonnet-4-20250514" ) ,
50- prompt : `Estimate the employee count for "${ companyName } " based on these search results:
49+ prompt :
50+ `Estimate the employee count for "${ companyName } " based on these search results:
5151
5252${ JSON . stringify ( results . results , null , 2 ) }
5353
You can’t perform that action at this time.
0 commit comments