mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: return ssr progress
This commit is contained in:
parent
e64be7cce2
commit
bc3b72068a
1 changed files with 7 additions and 7 deletions
|
|
@ -4,17 +4,17 @@ import type { LayoutServerLoad } from './$types';
|
|||
|
||||
export const load: LayoutServerLoad = async ({ fetch }) => {
|
||||
let details;
|
||||
|
||||
try {
|
||||
details = await apiFetchDetails(fetch);
|
||||
} catch {
|
||||
throw redirect(302, '/register');
|
||||
}
|
||||
|
||||
let submissionProgress;
|
||||
try {
|
||||
await apiFetchSubmissionProgress(fetch);
|
||||
} catch {
|
||||
// TODO:
|
||||
submissionProgress = await apiFetchSubmissionProgress(fetch);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
@ -22,9 +22,9 @@ export const load: LayoutServerLoad = async ({ fetch }) => {
|
|||
name: details.name,
|
||||
surname: details.surname,
|
||||
email: details.email
|
||||
}
|
||||
/*submission: {
|
||||
},
|
||||
submission: {
|
||||
...submissionProgress
|
||||
}*/
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue