mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-05 14:40:33 +08:00
fix(frontend): fix page switching breaking cause of undefined page keys (closes #1073)
This commit is contained in:
parent
fcdc9e086c
commit
efc717667d
@ -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
|
Loading…
Reference in New Issue
Block a user