1
+ import { useHeaderHeight } from '@react-navigation/elements'
1
2
import { NativeStackScreenProps } from '@react-navigation/native-stack'
2
3
import React , { useMemo , useState } from 'react'
3
4
import { useTranslation } from 'react-i18next'
@@ -6,6 +7,7 @@ import { SafeAreaView } from 'react-native-safe-area-context'
6
7
import Touchable from 'src/components/Touchable'
7
8
import ImageErrorIcon from 'src/icons/ImageErrorIcon'
8
9
import OpenLinkIcon from 'src/icons/OpenLinkIcon'
10
+ import { headerWithBackButton } from 'src/navigator/Headers'
9
11
import { navigate } from 'src/navigator/NavigationService'
10
12
import { Screens } from 'src/navigator/Screens'
11
13
import { StackParamList } from 'src/navigator/types'
@@ -106,6 +108,7 @@ export default function NftsInfoCarousel({ route }: Props) {
106
108
const { nfts, networkId } = route . params
107
109
const [ activeNft , setActiveNft ] = useState < Nft | null > ( nfts [ 0 ] ?? null )
108
110
const { t } = useTranslation ( )
111
+ const headerHeight = useHeaderHeight ( )
109
112
110
113
const blockExplorerUri = useMemo ( ( ) => {
111
114
if (
@@ -161,7 +164,11 @@ export default function NftsInfoCarousel({ route }: Props) {
161
164
}
162
165
163
166
return (
164
- < SafeAreaView edges = { [ ] } style = { styles . safeAreaView } testID = "NftsInfoCarousel" >
167
+ < SafeAreaView
168
+ style = { [ styles . safeAreaView , { paddingTop : headerHeight } ] }
169
+ edges = { [ ] }
170
+ testID = "NftsInfoCarousel"
171
+ >
165
172
< ScrollView >
166
173
{ /* Main Nft Video or Image */ }
167
174
< NftMedia
@@ -233,6 +240,17 @@ export default function NftsInfoCarousel({ route }: Props) {
233
240
)
234
241
}
235
242
243
+ NftsInfoCarousel . navigationOptions = ( ) => ( {
244
+ ...headerWithBackButton ,
245
+ headerTransparent : true ,
246
+ headerShown : true ,
247
+ headerStyle : {
248
+ backgroundColor : 'transparent' ,
249
+ } ,
250
+ animation : 'slide_from_right' ,
251
+ animationDuration : 130 ,
252
+ } )
253
+
236
254
const styles = StyleSheet . create ( {
237
255
attributeText : {
238
256
...fontStyles . regular ,
0 commit comments