From 0ac6bad390eff8efea22d874c2a291d879116be7 Mon Sep 17 00:00:00 2001 From: LFBarreto Date: Fri, 4 Mar 2022 13:33:54 +0100 Subject: [PATCH] fix(React Navigation Header): issue where headerTitle = null defaults to route name header title --- src/components/RootNavigator/ClaimRewardsNavigator.js | 4 ++-- src/components/RootNavigator/FreezeNavigator.js | 2 +- src/components/RootNavigator/UnfreezeNavigator.js | 2 +- src/families/cosmos/ClaimRewardsFlow/index.js | 2 +- src/families/cosmos/DelegationFlow/index.js | 2 +- src/families/cosmos/RedelegationFlow/index.js | 2 +- src/families/cosmos/UndelegationFlow/index.js | 4 ++-- src/families/polkadot/BondFlow/index.js | 2 +- src/families/polkadot/NominateFlow/index.js | 2 +- src/families/polkadot/RebondFlow/index.js | 2 +- src/families/polkadot/SimpleOperationFlow/index.js | 2 +- src/families/polkadot/UnbondFlow/index.js | 2 +- src/families/tron/VoteFlow/index.js | 2 +- src/screens/WalletConnect/Connect.js | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/RootNavigator/ClaimRewardsNavigator.js b/src/components/RootNavigator/ClaimRewardsNavigator.js index e9e1275b19..cd04f7b2fb 100644 --- a/src/components/RootNavigator/ClaimRewardsNavigator.js +++ b/src/components/RootNavigator/ClaimRewardsNavigator.js @@ -57,7 +57,7 @@ export default function ClaimRewardsNavigator() { name={ScreenName.ClaimRewardsValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, @@ -66,7 +66,7 @@ export default function ClaimRewardsNavigator() { ); diff --git a/src/components/RootNavigator/FreezeNavigator.js b/src/components/RootNavigator/FreezeNavigator.js index ead51cf0fb..e76fa48c02 100644 --- a/src/components/RootNavigator/FreezeNavigator.js +++ b/src/components/RootNavigator/FreezeNavigator.js @@ -83,7 +83,7 @@ export default function FreezeNavigator() { name={ScreenName.FreezeValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/components/RootNavigator/UnfreezeNavigator.js b/src/components/RootNavigator/UnfreezeNavigator.js index 8d274b7b58..12f801ac51 100644 --- a/src/components/RootNavigator/UnfreezeNavigator.js +++ b/src/components/RootNavigator/UnfreezeNavigator.js @@ -73,7 +73,7 @@ export default function UnfreezeNavigator() { name={ScreenName.UnfreezeValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/cosmos/ClaimRewardsFlow/index.js b/src/families/cosmos/ClaimRewardsFlow/index.js index a13d5a5c9a..b0a91eb5a1 100644 --- a/src/families/cosmos/ClaimRewardsFlow/index.js +++ b/src/families/cosmos/ClaimRewardsFlow/index.js @@ -111,7 +111,7 @@ function ClaimRewardsFlow() { options={{ headerLeft: null, headerRight: null, - headerTitle: null, + headerTitle: "", gestureEnabled: false, }} /> diff --git a/src/families/cosmos/DelegationFlow/index.js b/src/families/cosmos/DelegationFlow/index.js index 1271238181..097001f6ba 100644 --- a/src/families/cosmos/DelegationFlow/index.js +++ b/src/families/cosmos/DelegationFlow/index.js @@ -126,7 +126,7 @@ function DelegationFlow() { options={{ headerLeft: null, headerRight: null, - headerTitle: null, + headerTitle: "", gestureEnabled: false, }} /> diff --git a/src/families/cosmos/RedelegationFlow/index.js b/src/families/cosmos/RedelegationFlow/index.js index 10c17977b6..7dbf23821e 100644 --- a/src/families/cosmos/RedelegationFlow/index.js +++ b/src/families/cosmos/RedelegationFlow/index.js @@ -117,7 +117,7 @@ function RedelegationFlow() { options={{ headerLeft: null, headerRight: null, - headerTitle: null, + headerTitle: "", gestureEnabled: false, }} /> diff --git a/src/families/cosmos/UndelegationFlow/index.js b/src/families/cosmos/UndelegationFlow/index.js index e14f556282..2a1421f8f1 100644 --- a/src/families/cosmos/UndelegationFlow/index.js +++ b/src/families/cosmos/UndelegationFlow/index.js @@ -77,7 +77,7 @@ function UndelegationFlow() { name={ScreenName.CosmosUndelegationValidationError} component={UndelegationValidationError} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, }} /> @@ -86,7 +86,7 @@ function UndelegationFlow() { component={UndelegationValidationSuccess} options={{ headerLeft: null, - headerTitle: null, + headerTitle: "", headerRight: null, gestureEnabled: false, }} diff --git a/src/families/polkadot/BondFlow/index.js b/src/families/polkadot/BondFlow/index.js index 74dfa62ca2..01d0608080 100644 --- a/src/families/polkadot/BondFlow/index.js +++ b/src/families/polkadot/BondFlow/index.js @@ -88,7 +88,7 @@ function BondFlow() { name={ScreenName.PolkadotBondValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/polkadot/NominateFlow/index.js b/src/families/polkadot/NominateFlow/index.js index 8eb749fead..08acc3b85d 100644 --- a/src/families/polkadot/NominateFlow/index.js +++ b/src/families/polkadot/NominateFlow/index.js @@ -77,7 +77,7 @@ function NominateFlow() { name={ScreenName.PolkadotNominateValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/polkadot/RebondFlow/index.js b/src/families/polkadot/RebondFlow/index.js index 3e6913c51a..8fd0639067 100644 --- a/src/families/polkadot/RebondFlow/index.js +++ b/src/families/polkadot/RebondFlow/index.js @@ -77,7 +77,7 @@ function RebondFlow() { name={ScreenName.PolkadotRebondValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/polkadot/SimpleOperationFlow/index.js b/src/families/polkadot/SimpleOperationFlow/index.js index cabb8ce3be..c8d0f62a07 100644 --- a/src/families/polkadot/SimpleOperationFlow/index.js +++ b/src/families/polkadot/SimpleOperationFlow/index.js @@ -71,7 +71,7 @@ function SimpleOperationFlow() { name={ScreenName.PolkadotSimpleOperationValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/polkadot/UnbondFlow/index.js b/src/families/polkadot/UnbondFlow/index.js index ff2b892505..95d06f677f 100644 --- a/src/families/polkadot/UnbondFlow/index.js +++ b/src/families/polkadot/UnbondFlow/index.js @@ -77,7 +77,7 @@ function UnbondFlow() { name={ScreenName.PolkadotUnbondValidationSuccess} component={ValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/families/tron/VoteFlow/index.js b/src/families/tron/VoteFlow/index.js index a0c7db1994..fce0d3c078 100644 --- a/src/families/tron/VoteFlow/index.js +++ b/src/families/tron/VoteFlow/index.js @@ -121,7 +121,7 @@ function VoteFlow() { name={ScreenName.VoteValidationSuccess} component={VoteValidationSuccess} options={{ - headerTitle: null, + headerTitle: "", gestureEnabled: false, headerLeft: null, headerRight: null, diff --git a/src/screens/WalletConnect/Connect.js b/src/screens/WalletConnect/Connect.js index 2b47b79ebe..31456792ae 100644 --- a/src/screens/WalletConnect/Connect.js +++ b/src/screens/WalletConnect/Connect.js @@ -91,7 +91,7 @@ export default function Connect({ route, navigation }: Props) { navigation.setOptions({ ...opts, title: "Wallet Connect", - headerTitle: null, + headerTitle: "", }); } }, [wcContext, navigation]);