⬆️ Finished upgrading SvelteKit
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
// import { redirect } from '@sveltejs/kit';
|
||||
import { signedIn } from '$lib/stores';
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
export async function load({ session }) {
|
||||
if (session.authenticated) {
|
||||
export const load: LayoutLoad = async ({ data }) => {
|
||||
const { email } = data;
|
||||
if (email) {
|
||||
signedIn.set(true);
|
||||
// throw redirect(302, '/dashboard');
|
||||
} else {
|
||||
signedIn.set(false);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user