@@ -7,6 +7,7 @@ import { ThemeToggle } from '@/components/ThemeToggle'
77import { Toaster , toast } from '@/components/ui/sonner'
88import { create } from 'zustand'
99import { useShallow } from 'zustand/react/shallow'
10+ import { AppLayout } from '@/components/layout/AppLayout'
1011
1112// Timer store: independent slice with a clear, minimal API, for demonstration
1213type TimerState = {
@@ -94,61 +95,54 @@ export function HomePage() {
9495 const formatted = formatDuration ( elapsedMs )
9596
9697 return (
97- < main className = "min-h-screen flex flex-col items-center justify-center bg-background text-foreground p-4 overflow-hidden relative" >
98- < ThemeToggle / >
99-
100- < div className = "absolute inset-0 bg-gradient-rainbow opacity-10 dark:opacity-20" />
101-
102- < div className = "text-center space-y-8 relative z-10 animate-fade-in " >
103- < div className = "flex justify-center" >
104- < div className = "w-16 h-16 rounded-2xl bg-gradient-primary flex items-center justify-center shadow-primary floating" >
105- < Sparkles className = "w-8 h-8 text-white rotating" / >
98+ < AppLayout >
99+ < div className = "min-h-screen flex flex-col items-center justify-center bg-background text-foreground p-4 overflow-hidden relative" >
100+ < ThemeToggle />
101+ < div className = "absolute inset-0 bg-gradient-rainbow opacity-10 dark:opacity-20 pointer-events-none " />
102+ < div className = "text-center space-y-8 relative z-10 animate-fade-in" >
103+ < div className = "flex justify-center " >
104+ < div className = "w-16 h-16 rounded-2xl bg-gradient-primary flex items-center justify-center shadow-primary floating " >
105+ < Sparkles className = "w-8 h-8 text-white rotating" / >
106+ </ div >
106107 </ div >
107- </ div >
108-
109- < h1 className = "text-5xl md:text-7xl font-display font-bold text-balance leading-tight" >
110- Creating your < span className = "text-gradient" > app</ span >
111- </ h1 >
112-
113- < p className = "text-lg md:text-xl text-muted-foreground max-w-xl mx-auto text-pretty" >
114- Your application would be ready soon.
115- </ p >
116-
117- < div className = "flex justify-center gap-4" >
118- < Button
119- size = "lg"
120- onClick = { onPleaseWait }
121- className = "btn-gradient px-8 py-4 text-lg font-semibold hover:-translate-y-0.5 transition-all duration-200"
122- aria-live = "polite"
123- >
124- Please Wait
125- </ Button >
126- </ div >
127-
128- < div className = "flex items-center justify-center gap-6 text-sm text-muted-foreground" >
129- < div >
130- Time elapsed: < span className = "font-medium tabular-nums text-foreground" > { formatted } </ span >
108+ < h1 className = "text-5xl md:text-7xl font-display font-bold text-balance leading-tight" >
109+ Creating your < span className = "text-gradient" > app</ span >
110+ </ h1 >
111+ < p className = "text-lg md:text-xl text-muted-foreground max-w-xl mx-auto text-pretty" >
112+ Your application would be ready soon.
113+ </ p >
114+ < div className = "flex justify-center gap-4" >
115+ < Button
116+ size = "lg"
117+ onClick = { onPleaseWait }
118+ className = "btn-gradient px-8 py-4 text-lg font-semibold hover:-translate-y-0.5 transition-all duration-200"
119+ aria-live = "polite"
120+ >
121+ Please Wait
122+ </ Button >
131123 </ div >
132- < div >
133- Coins: < span className = "font-medium tabular-nums text-foreground" > { count } </ span >
124+ < div className = "flex items-center justify-center gap-6 text-sm text-muted-foreground" >
125+ < div >
126+ Time elapsed: < span className = "font-medium tabular-nums text-foreground" > { formatted } </ span >
127+ </ div >
128+ < div >
129+ Coins: < span className = "font-medium tabular-nums text-foreground" > { count } </ span >
130+ </ div >
131+ </ div >
132+ < div className = "flex justify-center gap-2" >
133+ < Button variant = "outline" size = "sm" onClick = { ( ) => { resetTimer ( ) ; resetCount ( ) ; toast ( 'Reset complete' ) } } >
134+ Reset
135+ </ Button >
136+ < Button variant = "outline" size = "sm" onClick = { ( ) => { inc ( ) ; toast ( 'Coin added' ) } } >
137+ Add Coin
138+ </ Button >
134139 </ div >
135140 </ div >
136-
137- < div className = "flex justify-center gap-2" >
138- < Button variant = "outline" size = "sm" onClick = { ( ) => { resetTimer ( ) ; resetCount ( ) ; toast ( 'Reset complete' ) } } >
139- Reset
140- </ Button >
141- < Button variant = "outline" size = "sm" onClick = { ( ) => { inc ( ) ; toast ( 'Coin added' ) } } >
142- Add Coin
143- </ Button >
144- </ div >
141+ < footer className = "absolute bottom-8 text-center text-muted-foreground/80" >
142+ < p > Powered by Cloudflare</ p >
143+ </ footer >
144+ < Toaster richColors closeButton />
145145 </ div >
146-
147- < footer className = "absolute bottom-8 text-center text-muted-foreground/80" >
148- < p > Powered by Cloudflare</ p >
149- </ footer >
150-
151- < Toaster richColors closeButton />
152- </ main >
146+ </ AppLayout >
153147 )
154148}
0 commit comments