Clear old workouts when predicting new set

Closes #73
This commit is contained in:
Brandon Presley 2022-09-30 17:07:26 +13:00
parent 4d219581d0
commit c8cedef8fb
1 changed files with 1 additions and 0 deletions

View File

@ -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});