fix: multi-events

This commit is contained in:
2026-09-16 00:21:08 +02:00
parent 68de07645a
commit 85e67599af
4 changed files with 78 additions and 70 deletions
+10 -4
View File
@@ -14,6 +14,12 @@ import {
type SortingState,
} from "@tanstack/vue-table";
interface Props {
eventPath: string;
}
const props = defineProps<Props>();
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);
});
</script>