diff --git a/src/config.ts b/src/config.ts index 3e9351da..adc28e64 100644 --- a/src/config.ts +++ b/src/config.ts @@ -2,3 +2,4 @@ export const WebsiteName: string = "SaaS Starter" export const WebsiteBaseUrl: string = "https://saasstarter.work" export const WebsiteDescription: string = "Open source, fast, and free to host SaaS template. Built with SvelteKit, Supabase, Stripe, Tailwind, DaisyUI, and Postgres" +export const CreateProfileStep: boolean = true diff --git a/src/routes/(admin)/account/+layout.ts b/src/routes/(admin)/account/+layout.ts index 52c667dd..06bb5f19 100644 --- a/src/routes/(admin)/account/+layout.ts +++ b/src/routes/(admin)/account/+layout.ts @@ -5,6 +5,7 @@ import { import { createSupabaseLoadClient } from "@supabase/auth-helpers-sveltekit" import type { Database } from "../../../DatabaseDefinitions.js" import { redirect } from "@sveltejs/kit" +import { CreateProfileStep } from "../../../config" export const load = async ({ fetch, data, depends, url }) => { depends("supabase:auth") @@ -29,7 +30,8 @@ export const load = async ({ fetch, data, depends, url }) => { profile && !_hasFullProfile(profile) && url.pathname !== createProfilePath && - url.pathname !== signOutPath + url.pathname !== signOutPath && + CreateProfileStep ) { redirect(303, createProfilePath) }