diff --git a/StartPlan.tsx b/StartPlan.tsx index d74bb6e..78f2908 100644 --- a/StartPlan.tsx +++ b/StartPlan.tsx @@ -47,7 +47,7 @@ export default function StartPlan() { setCounts(newCounts); console.log(`${StartPlan.name}.focus:`, {newCounts}); }); - }, [params]), + }, [workouts]), ); const handleSubmit = async () => { @@ -101,7 +101,7 @@ export default function StartPlan() { setUnit(newBest.unit); setBest(newBest); }, - [name, workouts], + [name, counts], ); return ( diff --git a/package.json b/package.json index 4f80da3..b63c6c7 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@types/react-native-svg-charts": "^5.0.12", "@types/react-native-vector-icons": "^6.4.12", "babel-plugin-transform-remove-console": "^6.9.4", + "eslint-plugin-flowtype": "^8.0.3", "react": "^18.2.0", "react-native": "^0.70.4", "react-native-document-picker": "^8.1.2", diff --git a/yarn.lock b/yarn.lock index b67f830..3cb35e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4556,6 +4556,20 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-flowtype@npm:^8.0.3": + version: 8.0.3 + resolution: "eslint-plugin-flowtype@npm:8.0.3" + dependencies: + lodash: ^4.17.21 + string-natural-compare: ^3.0.1 + peerDependencies: + "@babel/plugin-syntax-flow": ^7.14.5 + "@babel/plugin-transform-react-jsx": ^7.14.9 + eslint: ^8.1.0 + checksum: 30e63c5357b0b5571f39afed51e59c140084f4aa53c106b1fd04f26da42b268908466daa6020b92943e71409bdaee1c67202515ed9012404d027cc92cb03cefa + languageName: node + linkType: hard + "eslint-plugin-jest@npm:22.4.1": version: 22.4.1 resolution: "eslint-plugin-jest@npm:22.4.1" @@ -6483,6 +6497,7 @@ __metadata: "@typescript-eslint/parser": ^5.29.0 babel-plugin-transform-remove-console: ^6.9.4 eslint: ^8.26.0 + eslint-plugin-flowtype: ^8.0.3 metro-react-native-babel-preset: ^0.73.3 react: ^18.2.0 react-native: ^0.70.4 @@ -8959,6 +8974,13 @@ __metadata: languageName: node linkType: hard +"string-natural-compare@npm:^3.0.1": + version: 3.0.1 + resolution: "string-natural-compare@npm:3.0.1" + checksum: 65910d9995074086e769a68728395effbba9b7186be5b4c16a7fad4f4ef50cae95ca16e3e9086e019cbb636ae8daac9c7b8fe91b5f21865c5c0f26e3c0725406 + languageName: node + linkType: hard + "string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3"