2026-06-16 16:39:54 +02:00
|
|
|
"use client";
|
|
|
|
|
|
2026-06-18 11:05:30 +02:00
|
|
|
import Image from "next/image";
|
2026-06-16 16:39:54 +02:00
|
|
|
import { useOnboarding } from "@onboardjs/react";
|
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
import { OnboardingStepper } from "@/features/onboarding/onboarding-stepper";
|
2026-06-18 11:05:30 +02:00
|
|
|
import { OnboardingChecklist } from "@/features/onboarding/onboarding-checklist";
|
|
|
|
|
import Logo from "@/app/icon0.svg";
|
2026-06-16 16:39:54 +02:00
|
|
|
|
|
|
|
|
export const OnboardingShell = () => {
|
|
|
|
|
const { state, previous, skip, renderStep } = useOnboarding();
|
|
|
|
|
|
|
|
|
|
if (!state) return null;
|
|
|
|
|
|
|
|
|
|
const showSplit = state.currentStep?.id !== "agent-waiting" && state.currentStep?.id !== "finish";
|
|
|
|
|
|
|
|
|
|
return (
|
2026-06-18 11:05:30 +02:00
|
|
|
<div className="min-h-screen bg-zinc-950 text-white flex flex-col items-center justify-center p-4 gap-4">
|
|
|
|
|
{/* Logo */}
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<Image src={Logo} alt="Portabase" width={28} height={28} />
|
|
|
|
|
<span className="text-lg font-semibold tracking-tight">Portabase</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Card */}
|
2026-06-16 16:39:54 +02:00
|
|
|
<div className="w-full max-w-4xl rounded-2xl bg-zinc-900 border border-white/10 shadow-2xl overflow-hidden flex flex-col md:flex-row min-h-[560px]">
|
|
|
|
|
<div className="flex-1 flex flex-col gap-6 p-8">
|
|
|
|
|
<OnboardingStepper />
|
|
|
|
|
<div className="flex-1">{renderStep()}</div>
|
|
|
|
|
<div className="flex justify-between">
|
|
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
onClick={() => previous()}
|
|
|
|
|
disabled={state.isFirstStep || state.isLoading}
|
|
|
|
|
>
|
|
|
|
|
Back
|
|
|
|
|
</Button>
|
|
|
|
|
{state.isSkippable && (
|
|
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
onClick={() => skip()}
|
|
|
|
|
disabled={state.isLoading}
|
|
|
|
|
>
|
|
|
|
|
Skip
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{showSplit && (
|
2026-06-18 11:05:30 +02:00
|
|
|
<div className="hidden md:block w-[300px] border-l border-white/10 bg-zinc-950">
|
|
|
|
|
<OnboardingChecklist />
|
2026-06-16 16:39:54 +02:00
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2026-06-18 11:05:30 +02:00
|
|
|
|
|
|
|
|
{/* Footer */}
|
|
|
|
|
<p className="text-xs text-zinc-600">Made with ♥ by Portabase</p>
|
2026-06-16 16:39:54 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|