Skip to content

Commit b682502

Browse files
committed
[FIX] remove use useLayoutEffect - replace fast image plugin
1 parent 132987f commit b682502

13 files changed

Lines changed: 38 additions & 163 deletions

File tree

ios/Podfile.lock

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,13 @@ PODS:
894894
- RNDeviceInfo (8.4.7):
895895
- React-Core
896896
- RNFastImage (8.6.3):
897-
- React-Core
897+
- RCT-Folly
898+
- RCTRequired
899+
- RCTTypeSafety
900+
- React
901+
- React-Codegen
902+
- React-RCTFabric
903+
- ReactCommon/turbomodule/core
898904
- SDWebImage (~> 5.11.1)
899905
- SDWebImageWebPCoder (~> 0.8.4)
900906
- RNFS (2.20.0):
@@ -1045,7 +1051,7 @@ DEPENDENCIES:
10451051
- libevent (~> 2.1.12)
10461052
- OpenSSL-Universal (= 1.1.1100)
10471053
- Permission-Notifications (from `../node_modules/react-native-permissions/ios/Notifications/Permission-Notifications.podspec`)
1048-
- PoweredByDosh
1054+
- PoweredByDosh (= 2.8.0)
10491055
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
10501056
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
10511057
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -1393,7 +1399,7 @@ SPEC CHECKSUMS:
13931399
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
13941400
RNCMaskedView: c298b644a10c0c142055b3ae24d83879ecb13ccd
13951401
RNDeviceInfo: b32d24c84e40d54b736e62a7d2abd15e1225258d
1396-
RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
1402+
RNFastImage: fdf8c03d43026a4af81e15e483e457d8b60067c6
13971403
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
13981404
RNGestureHandler: 9d2ebd17a9fef618d9720e3d95ff5e6607acf8d4
13991405
RNInAppBrowser: e36d6935517101ccba0e875bac8ad7b0cb655364
@@ -1418,6 +1424,6 @@ SPEC CHECKSUMS:
14181424
Yoga: 065f0b74dba4832d6e328238de46eb72c5de9556
14191425
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
14201426

1421-
PODFILE CHECKSUM: fe2ed3756c1d0a13e122332e57fd8bb6d6538bab
1427+
PODFILE CHECKSUM: 284dfb8a2d77e871b858cb28fee6a828879f146d
14221428

14231429
COCOAPODS: 1.12.1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"react-native-device-info": "8.4.7",
105105
"react-native-draggable-flatlist": "4.0.1",
106106
"react-native-error-boundary": "1.2.1",
107-
"react-native-fast-image": "8.6.3",
107+
"react-native-fast-image": "https://github.com/numandev1/react-native-fast-image#feat/fabric-wolewicki",
108108
"react-native-fs": "2.20.0",
109109
"react-native-gesture-handler": "2.9.0",
110110
"react-native-get-random-values": "1.8.0",

src/navigation/tabs/shop/ShopHome.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import debounce from 'lodash.debounce';
22
import React, {
33
useCallback,
44
useEffect,
5-
useLayoutEffect,
65
useMemo,
76
useRef,
87
useState,
@@ -33,7 +32,6 @@ import {
3332
import {APP_NETWORK} from '../../../constants/config';
3433
import {useAppDispatch, useAppSelector} from '../../../utils/hooks';
3534
import {StackScreenProps} from '@react-navigation/stack';
36-
import {ShopScreens, ShopStackParamList} from './ShopStack';
3735
import {useTranslation} from 'react-i18next';
3836
import {
3937
useFocusEffect,
@@ -45,9 +43,12 @@ import {useTheme} from 'styled-components/native';
4543
import {SlateDark, White} from '../../../styles/colors';
4644
import {sleep} from '../../../utils/helper-methods';
4745
import {Analytics} from '../../../store/analytics/analytics.effects';
46+
import {TabsScreens, TabsStackParamList} from '../TabsStack';
4847
import {Bills} from './components/Bills';
4948
import {HEIGHT} from '../../../components/styled/Containers';
5049

50+
export type ShopStackScreenProps = StackScreenProps<TabsStackParamList, TabsScreens.SHOP>;
51+
5152
export 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;

src/navigation/tabs/shop/bill/screens/ConnectBills.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useEffect, useLayoutEffect, useState} from 'react';
1+
import React, {useEffect, useState} from 'react';
22
import {StackScreenProps} from '@react-navigation/stack';
33
import WebView from 'react-native-webview';
44
import {useSafeAreaInsets} from 'react-native-safe-area-context';
@@ -26,7 +26,7 @@ const ConnectBills = ({
2626
({BITPAY_ID}) => BITPAY_ID.apiToken[APP_NETWORK],
2727
);
2828

29-
useLayoutEffect(() => {
29+
useEffect(() => {
3030
dispatch(startOnGoingProcessModal('GENERAL_AWAITING'));
3131
// eslint-disable-next-line react-hooks/exhaustive-deps
3232
}, []);

src/navigation/tabs/shop/bill/screens/PayAllBills.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useLayoutEffect, useState} from 'react';
1+
import React, {useEffect, useState} from 'react';
22
import {StackScreenProps} from '@react-navigation/stack';
33
import {useTranslation} from 'react-i18next';
44
import {BillScreens, BillStackParamList} from '../BillStack';
@@ -203,7 +203,7 @@ const PayAllBills = ({
203203
});
204204
};
205205

206-
useLayoutEffect(() => {
206+
useEffect(() => {
207207
navigation.setOptions({
208208
headerTransparent: false,
209209
headerTitle: () => {

src/navigation/tabs/shop/bill/screens/PayBill.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useLayoutEffect, useState} from 'react';
1+
import React, {useEffect, useState} from 'react';
22
import {StackScreenProps} from '@react-navigation/stack';
33
import {useTranslation} from 'react-i18next';
44
import {BillScreens, BillStackParamList} from '../BillStack';
@@ -251,7 +251,7 @@ const PayBill = ({
251251
);
252252
};
253253

254-
useLayoutEffect(() => {
254+
useEffect(() => {
255255
navigation.setOptions({
256256
headerTransparent: false,
257257
headerTitle,

src/navigation/tabs/shop/bill/screens/Payment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useLayoutEffect, useState} from 'react';
1+
import React, {useEffect, useState} from 'react';
22
import {StackScreenProps} from '@react-navigation/stack';
33
import {useTranslation} from 'react-i18next';
44
import {BillStackParamList} from '../BillStack';
@@ -102,7 +102,7 @@ const Payment = ({
102102
},
103103
];
104104

105-
useLayoutEffect(() => {
105+
useEffect(() => {
106106
navigation.setOptions({
107107
headerTransparent: true,
108108
headerTitle: () => {

src/navigation/tabs/shop/bill/screens/Payments.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useLayoutEffect} from 'react';
1+
import React, {useEffect} from 'react';
22
import {StackScreenProps} from '@react-navigation/stack';
33
import {useTranslation} from 'react-i18next';
44
import {BillScreens, BillStackParamList} from '../BillStack';
@@ -26,7 +26,7 @@ const Payments = ({
2626
({SHOP}) => SHOP.billPayAccounts[APP_NETWORK],
2727
) as BillPayAccount[];
2828

29-
useLayoutEffect(() => {
29+
useEffect(() => {
3030
navigation.setOptions({
3131
headerTitle: () => {
3232
return (

src/navigation/wallet-connect/screens/WalletConnectConnections.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {useNavigation} from '@react-navigation/native';
2-
import React, {useCallback, useLayoutEffect, useState} from 'react';
2+
import React, {useCallback, useEffect, useState} from 'react';
33
import {useAppDispatch, useAppSelector} from '../../../utils/hooks';
44
import styled from 'styled-components/native';
55
import {BaseText, H5} from '../../../components/styled/Text';

src/navigation/wallet/screens/UpdateKeyOrWalletName.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const UpdateKeyOrWalletName: React.FC<UpdateKeyOrWalletNameScreenProps> = ({
4848
const dispatch = useAppDispatch();
4949
const {key, wallet, context} = route.params;
5050
const {walletName, walletId} = wallet || {};
51-
useLayoutEffect(() => {
51+
useEffect(() => {
5252
navigation.setOptions({
5353
headerTitle: () => (
5454
<HeaderTitle>

0 commit comments

Comments
 (0)