This commit is contained in:
Turbobot
2024-03-21 13:41:16 +08:00
committed by giancarlo
commit bb58169fe9
204 changed files with 26228 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
"use client";
import { useSearchParams } from "next/navigation";
import { AnimatePresence } from "framer-motion";
import { CreateApiKey } from "./create-api-key";
import { CreateProject } from "./create-project";
import { Done } from "./done";
import Intro from "./intro";
export function Onboarding(props: { workspaceId: string }) {
const search = useSearchParams();
const step = search.get("step");
return (
<div className="mx-auto flex h-[calc(100vh-14rem)] w-full max-w-screen-sm flex-col items-center">
<AnimatePresence mode="wait">
{!step && <Intro key="intro" />}
{step === "create-project" && (
<CreateProject workspaceId={props.workspaceId} />
)}
{step === "create-api-key" && <CreateApiKey />}
{step === "done" && <Done workspaceId={props.workspaceId} />}
</AnimatePresence>
</div>
);
}