diff --git a/EditPlan.tsx b/EditPlan.tsx index 776bc52..9d7daab 100644 --- a/EditPlan.tsx +++ b/EditPlan.tsx @@ -29,7 +29,7 @@ export default function EditPlan() { ), title: 'Plan', }); - }, []), + }, [navigation]), ); useEffect(() => { @@ -59,7 +59,7 @@ export default function EditPlan() { [newDays, newWorkouts, params.plan.id], ); navigation.goBack(); - }, [days, workouts, db, params.plan]); + }, [days, workouts, db, params, navigation]); const toggleWorkout = useCallback( (on: boolean, name: string) => { diff --git a/EditSet.tsx b/EditSet.tsx index 0ce54a3..8d1a375 100644 --- a/EditSet.tsx +++ b/EditSet.tsx @@ -34,7 +34,7 @@ export default function EditSet() { ), title: 'Set', }); - }, []), + }, [navigation]), ); const getTodaysPlan = useCallback(async (): Promise => { diff --git a/SettingsPage.tsx b/SettingsPage.tsx index 963854c..9574f29 100644 --- a/SettingsPage.tsx +++ b/SettingsPage.tsx @@ -10,7 +10,6 @@ import { import {Dirs, FileSystem} from 'react-native-file-access'; import {Button, Snackbar, Switch, TextInput} from 'react-native-paper'; import {DatabaseContext} from './App'; -import BatteryDialog from './BatteryDialog'; import Set from './set'; import DocumentPicker from 'react-native-document-picker'; import ConfirmDialog from './ConfirmDialog';