Skip to content

Commit

Permalink
bottom tab alternate fix
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Oct 9, 2023
1 parent 0f27275 commit 9f9a5cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/wallet-mobile/src/WalletNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const WalletTabNavigator = () => {
const wallet = useSelectedWallet()
const initialRoute = isHaskellShelley(wallet.walletImplementationId) ? 'staking-dashboard' : 'history'

const [keyboardStatus, setKeyboardStatus] = React.useState(false)
const [isKeyboardOpen, setIsKeyboardOpen] = React.useState(false)

React.useEffect(() => {
const showSubscription = Keyboard.addListener('keyboardWillShow', () => {
setKeyboardStatus(true)
setIsKeyboardOpen(true)
})
const hideSubscription = Keyboard.addListener('keyboardWillHide', () => {
setKeyboardStatus(false)
setIsKeyboardOpen(false)
})

return () => {
Expand All @@ -53,7 +53,7 @@ const WalletTabNavigator = () => {
tabBarActiveTintColor: theme.COLORS.NAVIGATION_ACTIVE,
tabBarInactiveTintColor: theme.COLORS.NAVIGATION_INACTIVE,
tabBarStyle: {
display: keyboardStatus ? 'none' : undefined,
display: isKeyboardOpen ? 'none' : undefined,
},
}}
initialRouteName={initialRoute}
Expand Down

0 comments on commit 9f9a5cf

Please sign in to comment.