import { get } from 'svelte/store'; import { redirect } from '@sveltejs/kit'; import { storedLocation } from '$lib/stores/settings'; import { buildLocationRoute } from '$lib/utils/location'; import type { PageLoad } from './$types'; export const load = (async () => { const location = get(storedLocation); const locationRoute = buildLocationRoute(location); throw redirect(303, '/weather/week/' + locationRoute); }) satisfies PageLoad;