fix(frontend): fix page switching breaking cause of undefined page keys (closes #1073)

This commit is contained in:
MiniDigger | Martin 2023-01-13 10:18:14 +01:00
parent fcdc9e086c
commit efc717667d
2 changed files with 12 additions and 2 deletions

View File

@ -35,10 +35,20 @@ useHead({
onErrorCaptured((err) => {
console.log("captured", transformAxiosError(err)); // TODO error handling
});
const pageKey = computed(() => {
if (route?.params?.user && route?.params?.project) {
return route.params.user + "-" + route.params.project;
} else if (route?.params?.user) {
return route.params.user;
} else {
return route.path;
}
});
</script>
<template>
<NuxtLayout>
<NuxtPage :page-key="route.params.user + '-' + route.params.project" />
<NuxtPage :page-key="pageKey" />
</NuxtLayout>
</template>

@ -1 +1 @@
Subproject commit 6d62556a16b6fcad5d8fad380492defedc64d64c
Subproject commit 0c33c5addc4ee496e3d0ee6ae56bb073f74dd071