From c8cedef8fb11e2f10176cf16a5022ef146e7deca Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 30 Sep 2022 17:07:26 +1300 Subject: [PATCH] Clear old workouts when predicting new set Closes #73 --- SetList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/SetList.tsx b/SetList.tsx index e316076..67747ac 100644 --- a/SetList.tsx +++ b/SetList.tsx @@ -33,6 +33,7 @@ export default function SetList() { const predict = useCallback(async () => { setCount(0); setSet({...defaultSet}); + setWorkouts([]); if (settings.newSet === 'empty') return; const todaysSet = await getToday(); console.log(`${SetList.name}.predict:`, {todaysSet});