diff --git a/src/screens/Signup/StepHandle/HandleSuggestions.tsx b/src/screens/Signup/StepHandle/HandleSuggestions.tsx new file mode 100644 index 0000000000..eef07554dc --- /dev/null +++ b/src/screens/Signup/StepHandle/HandleSuggestions.tsx @@ -0,0 +1,81 @@ +import {Easing} from 'react-native' +import Animated, {FadeInDown, FadeOut} from 'react-native-reanimated' +import {type ComAtprotoTempCheckHandleAvailability} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' + +import {atoms as a, native, useTheme} from '#/alf' +import {borderRadius} from '#/alf/tokens' +import {Button} from '#/components/Button' +import {Text} from '#/components/Typography' + +export function HandleSuggestions({ + suggestions, + onSelect, +}: { + suggestions: ComAtprotoTempCheckHandleAvailability.Suggestion[] + onSelect: ( + suggestions: ComAtprotoTempCheckHandleAvailability.Suggestion, + ) => void +}) { + const t = useTheme() + const {_} = useLingui() + + return ( + + {suggestions.map((suggestion, index) => ( + + ))} + + ) +} diff --git a/src/screens/Signup/StepHandle.tsx b/src/screens/Signup/StepHandle/index.tsx similarity index 78% rename from src/screens/Signup/StepHandle.tsx rename to src/screens/Signup/StepHandle/index.tsx index 0b415c121d..32760f6b2a 100644 --- a/src/screens/Signup/StepHandle.tsx +++ b/src/screens/Signup/StepHandle/index.tsx @@ -1,14 +1,11 @@ import {useState} from 'react' import {View} from 'react-native' import Animated, { - Easing, FadeIn, - FadeInDown, FadeOut, LayoutAnimationConfig, LinearTransition, } from 'react-native-reanimated' -import {type ComAtprotoTempCheckHandleAvailability} from '@atproto/api' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -26,14 +23,13 @@ import { import {ScreenTransition} from '#/screens/Login/ScreenTransition' import {useSignupContext} from '#/screens/Signup/state' import {atoms as a, native, useTheme} from '#/alf' -import {borderRadius} from '#/alf/tokens' -import {Button} from '#/components/Button' import * as TextField from '#/components/forms/TextField' import {useThrottledValue} from '#/components/hooks/useThrottledValue' import {At_Stroke2_Corner0_Rounded as AtIcon} from '#/components/icons/At' import {Check_Stroke2_Corner0_Rounded as CheckIcon} from '#/components/icons/Check' import {Text} from '#/components/Typography' -import {BackNextButtons} from './BackNextButtons' +import {BackNextButtons} from '../BackNextButtons' +import {HandleSuggestions} from './HandleSuggestions' export function StepHandle() { const {_} = useLingui() @@ -275,74 +271,3 @@ function RequirementText({children}: {children: React.ReactNode}) { ) } - -function HandleSuggestions({ - suggestions, - onSelect, -}: { - suggestions: ComAtprotoTempCheckHandleAvailability.Suggestion[] - onSelect: ( - suggestions: ComAtprotoTempCheckHandleAvailability.Suggestion, - ) => void -}) { - const t = useTheme() - const {_} = useLingui() - - return ( - - {suggestions.map((suggestion, index) => ( - - ))} - - ) -}