feat: add site onboarding route

This commit is contained in:
Tom Boullay
2026-05-30 04:00:09 +02:00
parent 8cfee1ac93
commit a2cff0567e
15 changed files with 907 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { create } from "zustand";
import type { SiteStep } from "@/types/game";
interface SiteState {
currentStep: SiteStep;
selectedExperience: number | null;
selectedSituation: number | null;
}
interface SiteActions {
setStep: (step: SiteStep) => void;
setSelectedExperience: (index: number) => void;
setSelectedSituation: (index: number) => void;
reset: () => void;
}
type SiteStore = SiteState & SiteActions;
const initialState: SiteState = {
currentStep: "disclaimer",
selectedExperience: null,
selectedSituation: null,
};
export const useSiteStore = create<SiteStore>()((set) => ({
...initialState,
setStep: (step) => set({ currentStep: step }),
setSelectedExperience: (index) => set({ selectedExperience: index }),
setSelectedSituation: (index) => set({ selectedSituation: index }),
reset: () => set(initialState),
}));