From 205f47a8a3590ace026a1edd986aa36b866f9813 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Sun, 15 Sep 2024 13:24:24 +0700 Subject: [PATCH 1/6] fix: unique key warning --- src/components/MoneyRequestConfirmationListFooter.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestConfirmationListFooter.tsx b/src/components/MoneyRequestConfirmationListFooter.tsx index 93b80f5732d2..e36412b3f44a 100644 --- a/src/components/MoneyRequestConfirmationListFooter.tsx +++ b/src/components/MoneyRequestConfirmationListFooter.tsx @@ -300,7 +300,10 @@ function MoneyRequestConfirmationListFooter({ }, { item: ( - + + Date: Wed, 18 Sep 2024 01:12:21 +0700 Subject: [PATCH 2/6] fix: invalid prop inbetweenCompo of type boolean --- src/components/AddressSearch/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/AddressSearch/index.tsx b/src/components/AddressSearch/index.tsx index c7753dccadd7..9f63f81a4c1f 100644 --- a/src/components/AddressSearch/index.tsx +++ b/src/components/AddressSearch/index.tsx @@ -462,15 +462,14 @@ function AddressSearch( }} inbetweenCompo={ // We want to show the current location button even if there are no recent destinations - predefinedPlaces?.length === 0 && - shouldShowCurrentLocationButton && ( + predefinedPlaces?.length === 0 && shouldShowCurrentLocationButton ? ( - ) + ) : undefined } placeholder="" listViewDisplayed From 0eee5faf00d7bc0913391cf9a60e7fd85467b923 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Wed, 18 Sep 2024 01:17:01 +0700 Subject: [PATCH 3/6] fix: invalid prop listEmptyComponent and listLoaderComponent of type function --- src/components/AddressSearch/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/AddressSearch/index.tsx b/src/components/AddressSearch/index.tsx index 9f63f81a4c1f..5a3bb6f6cd5b 100644 --- a/src/components/AddressSearch/index.tsx +++ b/src/components/AddressSearch/index.tsx @@ -1,4 +1,4 @@ -import React, {forwardRef, useCallback, useEffect, useMemo, useRef, useState} from 'react'; +import React, {forwardRef, useEffect, useMemo, useRef, useState} from 'react'; import type {ForwardedRef} from 'react'; import {ActivityIndicator, Keyboard, LogBox, View} from 'react-native'; import type {LayoutChangeEvent} from 'react-native'; @@ -329,12 +329,12 @@ function AddressSearch( return predefinedPlaces?.filter((predefinedPlace) => isPlaceMatchForSearch(searchValue, predefinedPlace)) ?? []; }, [predefinedPlaces, searchValue]); - const listEmptyComponent = useCallback( - () => (!isTyping ? null : {translate('common.noResultsFound')}), + const listEmptyComponent = useMemo( + () => (!isTyping ? undefined : {translate('common.noResultsFound')}), [isTyping, styles, translate], ); - const listLoader = useCallback( + const listLoader = useMemo( () => ( Date: Wed, 18 Sep 2024 01:23:42 +0700 Subject: [PATCH 4/6] remove redundant changes --- src/components/AddressSearch/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/AddressSearch/index.tsx b/src/components/AddressSearch/index.tsx index 5a3bb6f6cd5b..a06c76e4f869 100644 --- a/src/components/AddressSearch/index.tsx +++ b/src/components/AddressSearch/index.tsx @@ -345,7 +345,6 @@ function AddressSearch( ), [styles.pv4, theme.spinner], ); - ``; return ( /* From e9ef0dc86d18f7dbcfbc7f1dd5007155a1c632d5 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Wed, 18 Sep 2024 01:38:26 +0700 Subject: [PATCH 5/6] fix lint: jsx deprecation --- src/components/MoneyRequestConfirmationListFooter.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestConfirmationListFooter.tsx b/src/components/MoneyRequestConfirmationListFooter.tsx index e36412b3f44a..b77e3b993b8d 100644 --- a/src/components/MoneyRequestConfirmationListFooter.tsx +++ b/src/components/MoneyRequestConfirmationListFooter.tsx @@ -527,8 +527,8 @@ function MoneyRequestConfirmationListFooter({ }, ]; - const primaryFields: JSX.Element[] = []; - const supplementaryFields: JSX.Element[] = []; + const primaryFields: React.JSX.Element[] = []; + const supplementaryFields: React.JSX.Element[] = []; classifiedFields.forEach((field) => { if (field.shouldShow && !field.isSupplementary) { From f2f205be532fd93c7114d73c3cc0d56155a14ea7 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Thu, 19 Sep 2024 01:40:11 +0700 Subject: [PATCH 6/6] fix: unique key warning in MenuItemList --- src/components/MenuItemList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/MenuItemList.tsx b/src/components/MenuItemList.tsx index 2e732c691140..747e0578a0c4 100644 --- a/src/components/MenuItemList.tsx +++ b/src/components/MenuItemList.tsx @@ -84,6 +84,7 @@ function MenuItemList({ <> {menuItems.map((menuItemProps) => (