avatar to main merge

I have completed the character creation screen on the avatar branch and am preparing to merge it into main.
This commit is contained in:
pricewowen
2026-05-23 23:24:36 -06:00
parent 8957ecb81d
commit 61f98866e8
39 changed files with 2361 additions and 436 deletions

View File

@@ -1,10 +1,9 @@
import { redirect } from "next/navigation";
import {
hasCompletedOnboarding,
requireSessionUser,
} from "@/lib/auth-helpers";
import { requireSessionUser } from "@/lib/auth-helpers";
import { fetchOnboardingStatusForUser } from "@/lib/onboarding-status";
import { routes } from "@/lib/routes";
import { createClient } from "@/lib/supabase/server";
type OnboardingAuthGateProps = {
children: React.ReactNode;
@@ -12,8 +11,10 @@ type OnboardingAuthGateProps = {
export async function OnboardingAuthGate({ children }: OnboardingAuthGateProps) {
const user = await requireSessionUser();
const supabase = await createClient();
const status = await fetchOnboardingStatusForUser(user.id, supabase);
if (hasCompletedOnboarding(user)) {
if (status.appComplete) {
redirect(routes.avatar);
}