Fix plan starting

This commit is contained in:
Brandon Presley 2022-10-30 14:08:41 +13:00
parent a85bc04c35
commit 5fafc6a63a
3 changed files with 13 additions and 9 deletions

View File

@ -95,10 +95,10 @@ export default function StartPlan() {
async (index: number) => {
setSelected(index);
console.log(`${StartPlan.name}.next:`, {name});
if (!counts) return;
const workout = counts[index];
if (!workouts) return;
const workout = workouts[index];
console.log(`${StartPlan.name}.next:`, {workout});
const newBest = await getBestSet(workout.name);
const newBest = await getBestSet(workout);
setMinutes(newBest.minutes);
setSeconds(newBest.seconds);
setName(newBest.name);
@ -107,7 +107,7 @@ export default function StartPlan() {
setUnit(newBest.unit);
setBest(newBest);
},
[name, counts],
[name, workouts],
);
const getDescription = useCallback(

View File

@ -1,10 +1,13 @@
#!/bin/sh
set -ex
yarn tsc
yarn lint
yarn test
git push origin HEAD > /dev/null &
tsp yarn tsc
tsp yarn lint
tsp yarn test
tsp -w
tsp git push origin HEAD
cd android || exit 1
build=app/build.gradle
versionCode=$(

View File

@ -1,5 +1,6 @@
#!/bin/sh
cd android || exit 1
set -ex
cd android
./gradlew assembleRelease
adb -d install app/build/outputs/apk/release/app-arm64-v8a-release.apk