From 58a97db5b8e9c62d68c4ce6398d1213469ee38b2 Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 27 Jun 2024 22:01:02 -0700 Subject: [PATCH] Revert animation change in signup (#4693) --- src/screens/Signup/StepInfo/index.tsx | 8 ++--- src/screens/Signup/index.tsx | 44 +++++++++++++++------------ src/screens/Signup/state.ts | 2 ++ 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo/index.tsx index ea10d4365e..691e23a537 100644 --- a/src/screens/Signup/StepInfo/index.tsx +++ b/src/screens/Signup/StepInfo/index.tsx @@ -1,5 +1,5 @@ -import React, {useEffect} from 'react' -import {LayoutAnimation, View} from 'react-native' +import React from 'react' +import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -35,10 +35,6 @@ export function StepInfo({ const {_} = useLingui() const {state, dispatch} = useSignupContext() - useEffect(() => { - LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut) - }, [state.isLoading, isLoadingStarterPack]) - return ( diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx index 2ccb388465..8d1546fbc1 100644 --- a/src/screens/Signup/index.tsx +++ b/src/screens/Signup/index.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {LayoutAnimationConfig} from 'react-native-reanimated' +import Animated, {FadeIn, LayoutAnimationConfig} from 'react-native-reanimated' import {AppBskyGraphStarterpack} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -50,6 +50,8 @@ export function Signup({onPressBack}: {onPressBack: () => void}) { } = useStarterPackQuery({ uri: activeStarterPack?.uri, }) + + const [isFetchedAtMount] = React.useState(starterPack != null) const showStarterPackCard = activeStarterPack?.uri && !isFetchingStarterPack && starterPack @@ -159,25 +161,27 @@ export function Signup({onPressBack}: {onPressBack: () => void}) { {showStarterPackCard && AppBskyGraphStarterpack.isRecord(starterPack.record) ? ( - - - {starterPack.record.name} - - - {starterPack.feeds?.length ? ( - - You'll follow the suggested users and feeds once you finish - creating your account! - - ) : ( - - You'll follow the suggested users once you finish creating - your account! - - )} - - + + + + {starterPack.record.name} + + + {starterPack.feeds?.length ? ( + + You'll follow the suggested users and feeds once you + finish creating your account! + + ) : ( + + You'll follow the suggested users once you finish creating + your account! + + )} + + + ) : null}