diff --git a/polylan_submitter/src/Noita.vue b/polylan_submitter/src/Noita.vue index 8783762..708070e 100644 --- a/polylan_submitter/src/Noita.vue +++ b/polylan_submitter/src/Noita.vue @@ -14,6 +14,12 @@ import { type SortingState, } from "@tanstack/vue-table"; +interface Props { + eventPath: string; +} + +const props = defineProps(); + const noitaStore = useNoitaStore(); const { userInfo, objectives, leaderboard, isLoadingLeaderboard, isUploading } = storeToRefs(noitaStore); @@ -135,7 +141,7 @@ const submitRun = async () => { if (uploadedFiles.value.length === 0) return; try { - await noitaStore.submitRun(uploadedFiles.value); + await noitaStore.submitRun(props.eventPath, uploadedFiles.value); uploadedFiles.value = []; alert("Run submitted successfully!"); } catch (error) { @@ -145,12 +151,12 @@ const submitRun = async () => { }; const goHome = () => { - window.location.href = "/"; + window.location.href = `/${props.eventPath}/`; }; const clearCache = async () => { try { - await noitaStore.clearCache(); + await noitaStore.clearCache(props.eventPath); alert("Cache cleared successfully!"); } catch (error) { console.error("Error clearing cache:", error); @@ -159,7 +165,7 @@ const clearCache = async () => { }; onMounted(() => { - noitaStore.loadUserData(); + noitaStore.loadUserData(props.eventPath); }); diff --git a/polylan_submitter/src/components/Results.vue b/polylan_submitter/src/components/Results.vue index 066ae7f..34a41c9 100644 --- a/polylan_submitter/src/components/Results.vue +++ b/polylan_submitter/src/components/Results.vue @@ -1,6 +1,10 @@