@@ -2,7 +2,6 @@ import debounce from 'lodash.debounce';
22import React , {
33 useCallback ,
44 useEffect ,
5- useLayoutEffect ,
65 useMemo ,
76 useRef ,
87 useState ,
@@ -33,7 +32,6 @@ import {
3332import { APP_NETWORK } from '../../../constants/config' ;
3433import { useAppDispatch , useAppSelector } from '../../../utils/hooks' ;
3534import { StackScreenProps } from '@react-navigation/stack' ;
36- import { ShopScreens , ShopStackParamList } from './ShopStack' ;
3735import { useTranslation } from 'react-i18next' ;
3836import {
3937 useFocusEffect ,
@@ -45,9 +43,12 @@ import {useTheme} from 'styled-components/native';
4543import { SlateDark , White } from '../../../styles/colors' ;
4644import { sleep } from '../../../utils/helper-methods' ;
4745import { Analytics } from '../../../store/analytics/analytics.effects' ;
46+ import { TabsScreens , TabsStackParamList } from '../TabsStack' ;
4847import { Bills } from './components/Bills' ;
4948import { HEIGHT } from '../../../components/styled/Containers' ;
5049
50+ export type ShopStackScreenProps = StackScreenProps < TabsStackParamList , TabsScreens . SHOP > ;
51+
5152export enum ShopTabs {
5253 GIFT_CARDS = 'Gift Cards' ,
5354 SHOP_ONLINE = 'Shop Online' ,
@@ -122,9 +123,7 @@ const getScrollViewHeight = (
122123 : getShopOnlineScrollViewHeight ( integrationsCategories ) ;
123124} ;
124125
125- const ShopHome : React . FC <
126- StackScreenProps < ShopStackParamList , ShopScreens . HOME >
127- > = ( { route} ) => {
126+ const ShopHomeScreen : React . FC < ShopStackScreenProps > = ( { route} ) => {
128127 const { t} = useTranslation ( ) ;
129128 const theme = useTheme ( ) ;
130129 const availableCardMap = useAppSelector ( ( { SHOP } ) => SHOP . availableCardMap ) ;
@@ -170,7 +169,7 @@ const ShopHome: React.FC<
170169 [ availableGiftCards , categoriesAndCurations , purchasedGiftCards ] ,
171170 ) ;
172171
173- useLayoutEffect ( ( ) => {
172+ useEffect ( ( ) => {
174173 navigation . setOptions ( {
175174 headerLeft : ( ) => null ,
176175 headerTitle : ( ) => < HeaderTitle > { t ( 'Pay with Crypto' ) } </ HeaderTitle > ,
@@ -366,4 +365,4 @@ const ShopHome: React.FC<
366365 ) ;
367366} ;
368367
369- export default ShopHome ;
368+ export default ShopHomeScreen ;
0 commit comments