fix(submissions): having one scope only make the back return not work

This commit is contained in:
2026-10-15 23:36:06 +02:00
parent 4fd683ff2c
commit b837abdba0
3 changed files with 19 additions and 5 deletions
+5
View File
@@ -528,6 +528,11 @@ onMounted(async () => {
return;
}
scopeName.value = scope.name;
// The picker auto-redirects back here when there's only one scope, so
// going "back" to it would loop - head to the event home instead.
if (scopesResponse.data?.length === 1) {
pageHeaderStore.setBackRoute({ name: "home", params: { eventPath: props.eventPath } });
}
pageHeaderStore.setTitle(t("submissions.pageTitle", { game: gameName.value, scope: scopeName.value }));
// Add paste listener (only processes if hovering upload area)