From 51ed36e30a33181f286cb380d9db60cae36e8cbe Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 26 Aug 2022 15:17:45 +1200 Subject: [PATCH] Customize header title for EditPlan and EditSet --- EditPlan.tsx | 4 ++-- EditSet.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EditPlan.tsx b/EditPlan.tsx index ff77105..226f28f 100644 --- a/EditPlan.tsx +++ b/EditPlan.tsx @@ -29,9 +29,9 @@ export default function EditPlan() { navigation.goBack()} /> ), headerRight: () => null, - title: 'Plan', + title: params.plan.id ? 'Edit plan' : 'Create plan', }); - }, [navigation]), + }, [navigation, params.plan.id]), ); useEffect(() => { diff --git a/EditSet.tsx b/EditSet.tsx index 8eb8a95..8f4d0bf 100644 --- a/EditSet.tsx +++ b/EditSet.tsx @@ -26,9 +26,9 @@ export default function EditSet() { navigation.goBack()} /> ), headerRight: null, - title: 'Set', + title: params.set.id ? 'Edit set' : 'Create set', }); - }, [navigation]), + }, [navigation, params.set.id]), ); const startTimer = useCallback(async () => {