refac/fix: duplicated api calls for evaluation

This commit is contained in:
Timothy Jaeryang Baek
2026-01-10 23:58:40 +04:00
parent 0c369d195b
commit 2dd09223f2
2 changed files with 4 additions and 8 deletions
@@ -80,11 +80,7 @@
} }
}; };
$: if (page) { $: if (orderBy && direction && page) {
getFeedbacks();
}
$: if (orderBy && direction) {
getFeedbacks(); getFeedbacks();
} }
@@ -79,9 +79,9 @@
debounceTimer = setTimeout(() => loadLeaderboard(query), 500); debounceTimer = setTimeout(() => loadLeaderboard(query), 500);
}; };
$: query, debouncedLoad(); $: if (query !== null) {
debouncedLoad();
onMount(() => loadLeaderboard()); }
$: sortedModels = [...rankedModels].sort((a, b) => { $: sortedModels = [...rankedModels].sort((a, b) => {
const getValue = (m, key) => { const getValue = (m, key) => {