summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/global/NestedRouterView.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 15:17:41 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 15:17:41 +0900
commitbdc72e5817782316bb2c56ab362b4aa237236bef (patch)
tree209e6fca274123ea93dc38bce5e9a96bef15a974 /packages/frontend/src/components/global/NestedRouterView.vue
parent🎨 (diff)
downloadsharkey-bdc72e5817782316bb2c56ab362b4aa237236bef.tar.gz
sharkey-bdc72e5817782316bb2c56ab362b4aa237236bef.tar.bz2
sharkey-bdc72e5817782316bb2c56ab362b4aa237236bef.zip
clean up
Diffstat (limited to 'packages/frontend/src/components/global/NestedRouterView.vue')
-rw-r--r--packages/frontend/src/components/global/NestedRouterView.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/components/global/NestedRouterView.vue b/packages/frontend/src/components/global/NestedRouterView.vue
index eb7192d8e0..40ee21c674 100644
--- a/packages/frontend/src/components/global/NestedRouterView.vue
+++ b/packages/frontend/src/components/global/NestedRouterView.vue
@@ -47,14 +47,14 @@ function resolveNested(current: Resolved, d = 0): Resolved | null {
const current = resolveNested(router.current)!;
const currentPageComponent = shallowRef('component' in current.route ? current.route.component : MkLoadingPage);
const currentPageProps = ref(current.props);
-const key = ref(router.getCurrentKey() + JSON.stringify(Object.fromEntries(current.props)));
+const key = ref(router.getCurrentPath());
-function onChange({ resolved, key: newKey }) {
+function onChange({ resolved }) {
const current = resolveNested(resolved);
if (current == null || 'redirect' in current.route) return;
currentPageComponent.value = current.route.component;
currentPageProps.value = current.props;
- key.value = newKey + JSON.stringify(Object.fromEntries(current.props));
+ key.value = router.getCurrentPath();
}
router.addListener('change', onChange);