diff --git a/apps/mobile-wallet/src/components/footers/FooterMenu.tsx b/apps/mobile-wallet/src/components/footers/FooterMenu.tsx
index 990d69f04..bd4581f1d 100644
--- a/apps/mobile-wallet/src/components/footers/FooterMenu.tsx
+++ b/apps/mobile-wallet/src/components/footers/FooterMenu.tsx
@@ -18,7 +18,8 @@ along with the library. If not, see .
import { BottomTabBarProps } from '@react-navigation/bottom-tabs'
import { Canvas, LinearGradient, Rect, vec } from '@shopify/react-native-skia'
-import { StyleProp, useWindowDimensions, View, ViewStyle } from 'react-native'
+import { useState } from 'react'
+import { LayoutChangeEvent, StyleProp, useWindowDimensions, View, ViewStyle } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import styled, { css, useTheme } from 'styled-components/native'
@@ -28,12 +29,13 @@ interface FooterMenuProps extends BottomTabBarProps {
style?: StyleProp
}
-const gradientHeight = 130
-
const FooterMenu = ({ state, descriptors, navigation, style }: FooterMenuProps) => {
const insets = useSafeAreaInsets()
const { width: screenWidth } = useWindowDimensions()
const theme = useTheme()
+ const [footerHeight, setFooterHeight] = useState(120)
+
+ const gradientHeight = footerHeight + 30
const footerContent = (
<>
@@ -50,12 +52,16 @@ const FooterMenu = ({ state, descriptors, navigation, style }: FooterMenuProps)
>
)
+ const handleFooterLayout = (e: LayoutChangeEvent) => {
+ setFooterHeight(e.nativeEvent.layout.height + insets.bottom)
+ }
+
return (
-
-
+
+
`
position: absolute;
bottom: 0;
left: 0;
right: 0;
- height: ${gradientHeight}px;
+ height: ${({ height }) => height}px;
`
diff --git a/apps/mobile-wallet/src/components/headers/BaseHeader.tsx b/apps/mobile-wallet/src/components/headers/BaseHeader.tsx
index 55c3f2c56..2618124ec 100644
--- a/apps/mobile-wallet/src/components/headers/BaseHeader.tsx
+++ b/apps/mobile-wallet/src/components/headers/BaseHeader.tsx
@@ -48,7 +48,6 @@ export interface BaseHeaderProps extends ViewProps {
}
export const scrollEndThreshold = 80
-const gradientHeight = 110
const isIos = Platform.OS === 'ios'
@@ -65,8 +64,8 @@ const BaseHeader = ({
const theme = useTheme()
const { width: screenWidth } = useWindowDimensions()
const [headerHeight, setHeaderHeight] = useState(80)
- const gradientHeight = headerHeight + 30
+ const gradientHeight = headerHeight + 30
const defaultScrollRange = [0 + scrollEffectOffset, scrollEndThreshold + scrollEffectOffset]
const paddingTop = isIos ? insets.top : insets.top + 7
@@ -93,7 +92,6 @@ const BaseHeader = ({
)
const handleHeaderLayout = (e: LayoutChangeEvent) => {
- console.log(e.nativeEvent.layout.height)
setHeaderHeight(e.nativeEvent.layout.height)
}