From 60dac90dccc5e75efe3422b6c7c4e591a708676c Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 5 Dec 2025 12:32:36 +0200 Subject: [PATCH] update to new geo hook --- src/components/InternationalPhoneCodeSelect.tsx | 4 ++-- src/view/screens/Storybook/Forms.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/InternationalPhoneCodeSelect.tsx b/src/components/InternationalPhoneCodeSelect.tsx index 824a4f1fa1..ea29edeffd 100644 --- a/src/components/InternationalPhoneCodeSelect.tsx +++ b/src/components/InternationalPhoneCodeSelect.tsx @@ -8,9 +8,9 @@ import { INTERNATIONAL_TELEPHONE_CODES, } from '#/lib/international-telephone-codes' import {isWeb} from '#/platform/detection' -import {useGeolocationStatus} from '#/state/geolocation' import {atoms as a, web} from '#/alf' import * as Select from '#/components/Select' +import {useGeolocation} from '#/geolocation' /** * Country picker for a phone number input @@ -26,7 +26,7 @@ export function InternationalPhoneCodeSelect({ onChange: (value: string) => void }) { const {_, i18n} = useLingui() - const {location} = useGeolocationStatus() + const location = useGeolocation() const defaultCountry = useMemo(() => { return getDefaultCountry(location) diff --git a/src/view/screens/Storybook/Forms.tsx b/src/view/screens/Storybook/Forms.tsx index bef19e6c1e..3c8de8db95 100644 --- a/src/view/screens/Storybook/Forms.tsx +++ b/src/view/screens/Storybook/Forms.tsx @@ -2,7 +2,6 @@ import React from 'react' import {type TextInput, View} from 'react-native' import {getDefaultCountry} from '#/lib/international-telephone-codes' -import {useGeolocationStatus} from '#/state/geolocation' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {DateField, LabelText} from '#/components/forms/DateField' @@ -13,6 +12,7 @@ import * as ToggleButton from '#/components/forms/ToggleButton' import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe' import {InternationalPhoneCodeSelect} from '#/components/InternationalPhoneCodeSelect' import {H1, H3} from '#/components/Typography' +import {useGeolocation} from '#/geolocation' export function Forms() { const [toggleGroupAValues, setToggleGroupAValues] = React.useState(['a']) @@ -26,7 +26,7 @@ export function Forms() { const [value, setValue] = React.useState('') const [date, setDate] = React.useState('2001-01-01') - const {location} = useGeolocationStatus() + const location = useGeolocation() const [telCode, setTelCode] = React.useState(() => getDefaultCountry(location), )