feat: return ssr progress

This commit is contained in:
EETagent 2022-12-03 18:25:33 +01:00
parent e64be7cce2
commit bc3b72068a

View file

@ -4,17 +4,17 @@ import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ fetch }) => { export const load: LayoutServerLoad = async ({ fetch }) => {
let details; let details;
try { try {
details = await apiFetchDetails(fetch); details = await apiFetchDetails(fetch);
} catch { } catch {
throw redirect(302, '/register'); throw redirect(302, '/register');
} }
let submissionProgress;
try { try {
await apiFetchSubmissionProgress(fetch); submissionProgress = await apiFetchSubmissionProgress(fetch);
} catch { } catch (e) {
// TODO: console.log(e);
} }
return { return {
@ -22,9 +22,9 @@ export const load: LayoutServerLoad = async ({ fetch }) => {
name: details.name, name: details.name,
surname: details.surname, surname: details.surname,
email: details.email email: details.email
} },
/*submission: { submission: {
...submissionProgress ...submissionProgress
}*/ }
}; };
}; };