From e89582fd34b715f7264606b013a878adf905b270 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Mon, 8 Dec 2025 12:39:05 +0100 Subject: [PATCH] Make CountrySelectionPage use new SelectionList --- .../PersonalDetails/CountrySelectionPage.tsx | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx index b70b361f6b22..33e2ef70fd71 100644 --- a/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx @@ -1,8 +1,8 @@ import React, {useCallback, useMemo, useState} from 'react'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; -import SelectionList from '@components/SelectionListWithSections'; -import RadioListItem from '@components/SelectionListWithSections/RadioListItem'; +import SelectionList from '@components/SelectionList'; +import RadioListItem from '@components/SelectionList/ListItem/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import Navigation from '@libs/Navigation/Navigation'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; @@ -39,7 +39,6 @@ function CountrySelectionPage({route}: CountrySelectionPageProps) { ); const searchResults = searchOptions(searchValue, countries); - const headerMessage = searchValue.trim() && !searchResults.length ? translate('common.noResultsFound') : ''; const selectCountry = useCallback( (option: Option) => { @@ -56,6 +55,16 @@ function CountrySelectionPage({route}: CountrySelectionPageProps) { [route.params.backTo], ); + const textInputOptions = useMemo( + () => ({ + headerMessage: searchValue.trim() && !searchResults.length ? translate('common.noResultsFound') : '', + label: translate('common.country'), + value: searchValue, + onChangeText: setSearchValue, + }), + [searchResults.length, searchValue, translate], + ); + return (