fix(submissions): having one scope only make the back return not work
This commit is contained in:
@@ -12,7 +12,7 @@ const { t } = useI18n();
|
||||
const userStore = useUserStore();
|
||||
const { userInfo } = storeToRefs(userStore);
|
||||
const pageHeaderStore = usePageHeaderStore();
|
||||
const { title: dynamicTitle } = storeToRefs(pageHeaderStore);
|
||||
const { title: dynamicTitle, backRoute: dynamicBackRoute } = storeToRefs(pageHeaderStore);
|
||||
|
||||
const title = computed(() => {
|
||||
if (dynamicTitle.value) return dynamicTitle.value;
|
||||
@@ -21,7 +21,7 @@ const title = computed(() => {
|
||||
});
|
||||
|
||||
const goBack = () => {
|
||||
const backRoute = route.meta.getBackRoute?.(route);
|
||||
const backRoute = dynamicBackRoute.value ?? route.meta.getBackRoute?.(route);
|
||||
if (backRoute) {
|
||||
router.push(backRoute);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user