@@ -15,6 +15,7 @@ interface NovaEmptyStateProps {
1515 ) => void
1616 isAllSpaces : boolean
1717 spaceName ?: string
18+ onSwitchToAllSpaces ?: ( ) => void
1819}
1920
2021const cardClass = cn (
@@ -28,19 +29,13 @@ export function NovaEmptyState({
2829 onOpenIntegrations,
2930 isAllSpaces,
3031 spaceName,
32+ onSwitchToAllSpaces,
3133} : NovaEmptyStateProps ) {
3234 const handleInstallChrome = ( ) => {
3335 window . open ( CHROME_EXTENSION_URL , "_blank" , "noopener,noreferrer" )
3436 }
3537
36- const title = isAllSpaces
37- ? "Help Nova get to know you"
38- : "This space is empty"
39- const subtitle = isAllSpaces
40- ? "Add your first memory to get started."
41- : spaceName
42- ? `Add memories to ${ spaceName } to get started.`
43- : "Add memories to this space to get started."
38+ const showSingleSpaceEmpty = ! isAllSpaces && onSwitchToAllSpaces
4439
4540 return (
4641 < div
@@ -49,17 +44,81 @@ export function NovaEmptyState({
4944 >
5045 < div className = "max-w-xl w-full flex flex-col items-center text-center" >
5146 < NovaOrb size = { 80 } className = "blur-[2px]! mb-4" />
52- < h2
53- className = { cn (
54- "text-white text-xl md:text-2xl font-medium mb-2" ,
55- dmSansClassName ( ) ,
56- ) }
57- >
58- { title }
59- </ h2 >
60- < p className = { cn ( "text-[#8B8B8B] text-sm mb-6" , dmSansClassName ( ) ) } >
61- { subtitle }
62- </ p >
47+ { isAllSpaces ? (
48+ < >
49+ < h2
50+ className = { cn (
51+ "text-white text-xl md:text-2xl font-medium mb-2" ,
52+ dmSansClassName ( ) ,
53+ ) }
54+ >
55+ Help Nova get to know you
56+ </ h2 >
57+ < p className = { cn ( "text-[#8B8B8B] text-sm mb-6" , dmSansClassName ( ) ) } >
58+ Add your first memory to get started.
59+ </ p >
60+ </ >
61+ ) : showSingleSpaceEmpty ? (
62+ < >
63+ < h2
64+ className = { cn (
65+ "text-white text-xl md:text-2xl font-medium mb-2" ,
66+ dmSansClassName ( ) ,
67+ ) }
68+ >
69+ { spaceName ? (
70+ < >
71+ < span className = "text-[#fafafa] font-medium" >
72+ "{ spaceName } "
73+ </ span > { " " }
74+ is empty
75+ </ >
76+ ) : (
77+ "This space is empty"
78+ ) }
79+ </ h2 >
80+ < p className = { cn ( "text-[#8B8B8B] text-sm mb-3" , dmSansClassName ( ) ) } >
81+ Your memories may be in another space.
82+ </ p >
83+ < button
84+ id = "nova-empty-view-all-spaces"
85+ type = "button"
86+ onClick = { onSwitchToAllSpaces }
87+ className = { cn (
88+ "text-[#4BA0FA] text-sm font-medium flex items-center gap-1 mb-6" ,
89+ "hover:text-[#6BB0FF] transition-colors" ,
90+ dmSansClassName ( ) ,
91+ ) }
92+ >
93+ View all spaces
94+ < ArrowRight className = "size-3.5" />
95+ </ button >
96+ </ >
97+ ) : (
98+ < >
99+ < h2
100+ className = { cn (
101+ "text-white text-xl md:text-2xl font-medium mb-2" ,
102+ dmSansClassName ( ) ,
103+ ) }
104+ >
105+ This space is empty
106+ </ h2 >
107+ < p className = { cn ( "text-[#8B8B8B] text-sm mb-6" , dmSansClassName ( ) ) } >
108+ { spaceName ? (
109+ < >
110+ Add memories to{ " " }
111+ < span className = "text-[#fafafa] font-medium" >
112+ "{ spaceName } "
113+ </ span > { " " }
114+ to get started.
115+ </ >
116+ ) : (
117+ "Add memories to this space to get started."
118+ ) }
119+ </ p >
120+ </ >
121+ ) }
63122
64123 < div className = "grid grid-cols-1 sm:grid-cols-3 gap-3 w-full mb-4" >
65124 < button
0 commit comments