File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { DashboardSidebar } from "@/components/dashboard-sidebar" ;
2+ import { DashboardOnboardingTrigger } from "@/components/dashboard-onboarding-trigger" ;
23
34export default function DashboardLayout ( {
45 children,
56} : {
67 children : React . ReactNode ;
78} ) {
8- return < DashboardSidebar > { children } </ DashboardSidebar > ;
9+ return (
10+ < >
11+ < DashboardOnboardingTrigger />
12+ < DashboardSidebar > { children } </ DashboardSidebar >
13+ </ >
14+ ) ;
915}
Original file line number Diff line number Diff line change @@ -121,10 +121,6 @@ export default function NewImagePage() {
121121 void loadUsage ( ) ;
122122 } , [ loadUsage ] ) ;
123123
124- const handleStartOnboarding = ( ) => {
125- window . dispatchEvent ( new Event ( "book:onboarding-start" ) ) ;
126- } ;
127-
128124 const limit = isPro ? 50 : 5 ;
129125
130126 const processFile = useCallback ( async ( file : File ) => {
@@ -313,15 +309,6 @@ export default function NewImagePage() {
313309 < p className = "mt-2 text-muted-foreground" >
314310 Paste from clipboard (Ctrl+V / Cmd+V), or drag and drop an image here.
315311 </ p >
316- < Button
317- type = "button"
318- variant = "outline"
319- size = "sm"
320- className = "mt-3"
321- onClick = { handleStartOnboarding }
322- >
323- Start onboarding
324- </ Button >
325312 </ div >
326313
327314 < div className = "rounded-lg border border-border bg-card px-4 py-3 w-1/2" >
Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import { Button } from "@/components/ui/button" ;
4+
5+ export function DashboardOnboardingTrigger ( ) {
6+ const handleStartOnboarding = ( ) => {
7+ window . dispatchEvent ( new Event ( "book:onboarding-start" ) ) ;
8+ } ;
9+
10+ return (
11+ < div className = "fixed right-4 top-3 z-50" >
12+ < Button type = "button" variant = "outline" size = "sm" onClick = { handleStartOnboarding } >
13+ Demo App
14+ </ Button >
15+ </ div >
16+ ) ;
17+ }
18+
You can’t perform that action at this time.
0 commit comments