From 76e0ea49b4e3ade6ce95f912b94268a8048ced22 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Sun, 4 Sep 2022 16:35:40 +1200 Subject: [PATCH] Fix showing best records --- BestList.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BestList.tsx b/BestList.tsx index 052cd95..2c889c2 100644 --- a/BestList.tsx +++ b/BestList.tsx @@ -17,9 +17,12 @@ export default function BestList() { const refresh = useCallback(async () => { const weights = await getBestWeights(search); + console.log(BestList.name, {weights}); let newBest: Set[] = []; - for (const set of weights) - newBest.push(...(await getBestReps(search, set.weight))); + for (const set of weights) { + const reps = await getBestReps(set.name, set.weight); + newBest.push(...reps); + } setBests(newBest); }, [search]);