mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-26 05:22:04 +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 }) => {
|
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
|
||||||
}*/
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue