Skip to content

The only tool you need to know what is happening and how to fix it.

325 B
Raw Blame
import { redirect } from '@sveltejs/kit';
import { authState } from '$lib/state/auth.svelte';
import { statusDomainSlug } from '$lib/status-domain';
import type { PageLoad } from './$types';

export const load: PageLoad = () => {
	if (!authState.isAuthenticated && !statusDomainSlug) {
		throw redirect(302, '/login');
	}
};