import { redirect } from '@sveltejs/kit';

import type { LayoutServerLoad } from './$types';

export const load: LayoutServerLoad = async ({ locals }) => {
  if (!locals.account) {
    throw redirect(303, '/');
  }
  return {
    account: locals.account
  };
};
