Skip to content

Commit df50f9e

Browse files
Onboarding button moved to the top right of the screen
1 parent 2483486 commit df50f9e

3 files changed

Lines changed: 25 additions & 14 deletions

File tree

frontend/app/dashboard/layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import { DashboardSidebar } from "@/components/dashboard-sidebar";
2+
import { DashboardOnboardingTrigger } from "@/components/dashboard-onboarding-trigger";
23

34
export 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
}

frontend/app/dashboard/new-image/page.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+

0 commit comments

Comments
 (0)