fix(web): error when refreshing asset view in memory page (#2789)

This commit is contained in:
Alex 2023-06-16 10:09:16 -05:00 committed by GitHub
parent 377cec9fb1
commit a1b9a1d244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import { redirect } from '@sveltejs/kit';
export const prerender = false;
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ parent }) => {
const { user } = await parent();
if (!user) {
throw redirect(302, '/auth/login');
} else {
throw redirect(302, '/memory');
}
};

View File

@ -0,0 +1,14 @@
import { redirect } from '@sveltejs/kit';
export const prerender = false;
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ parent }) => {
const { user } = await parent();
if (!user) {
throw redirect(302, '/auth/login');
} else {
throw redirect(302, '/memory');
}
};