File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
components/src/layouts/Swiper
views/ReferFriends/pages/ReferAFriend Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11import type { ForwardedRef } from 'react' ;
2- import { forwardRef , useCallback , useImperativeHandle } from 'react' ;
2+ import { forwardRef , useCallback , useImperativeHandle , useMemo } from 'react' ;
33
44import { YStack } from 'tamagui' ;
55
@@ -96,6 +96,10 @@ function BaseSwiperFlatList<T>(
9696 } ,
9797 } ) ) ;
9898
99+ const extraData = useMemo ( ( ) => {
100+ return [ renderItem , data ] ;
101+ } , [ data , renderItem ] ) ;
102+
99103 return (
100104 < YStack
101105 position = "relative"
@@ -116,7 +120,7 @@ function BaseSwiperFlatList<T>(
116120 scrollEnabled = { scrollEnabled }
117121 renderItem = { handleRenderItem }
118122 data = { data }
119- extraData = { data }
123+ extraData = { extraData }
120124 initialNumToRender = { 1 }
121125 initialScrollIndex = { index }
122126 estimatedItemSize = { sharedStyle . height as number }
Original file line number Diff line number Diff line change @@ -157,7 +157,9 @@ function MoreActionButtonCmp() {
157157 id : ETranslations . settings_lock_now ,
158158 } ) ,
159159 icon : 'LockOutline' as const ,
160- onPress : onLock ,
160+ onPress : ( ) => {
161+ void onLock ( ) ;
162+ } ,
161163 testID : 'lock-now' ,
162164 } ,
163165 {
Original file line number Diff line number Diff line change @@ -310,8 +310,8 @@ export default function ReferAFriend() {
310310 code : code || '' ,
311311 } ,
312312 } ) ;
313- void openUrlUtils . linkingCanOpenURL ( url ) ;
314313 defaultLogger . referral . page . enterReferralGuide ( code ) ;
314+ globalThis . location . href = url ;
315315 }
316316 } ) ;
317317 } , [ navigation ] ) ;
You can’t perform that action at this time.
0 commit comments