about summary refs log tree commit diff
path: root/src/screens/Signup/StepInfo/index.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-06-27 21:44:26 -0700
committerGitHub <noreply@github.com>2024-06-27 21:44:26 -0700
commit8ebf9cc4b10a620d7698c1b0d0b316729c02dc13 (patch)
tree29a0b7488e5f8a52ca8945885fe1f65ee2bf651b /src/screens/Signup/StepInfo/index.tsx
parent91c4aa7c2dc598dd5e2c828e44c0d2c94cf0967d (diff)
downloadvoidsky-8ebf9cc4b10a620d7698c1b0d0b316729c02dc13.tar.zst
Handle pushing to starterpack screen when unauthed (#4692)
Diffstat (limited to 'src/screens/Signup/StepInfo/index.tsx')
-rw-r--r--src/screens/Signup/StepInfo/index.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo/index.tsx
index 4104b79b3..ea10d4365 100644
--- a/src/screens/Signup/StepInfo/index.tsx
+++ b/src/screens/Signup/StepInfo/index.tsx
@@ -1,5 +1,5 @@
-import React from 'react'
-import {View} from 'react-native'
+import React, {useEffect} from 'react'
+import {LayoutAnimation, View} from 'react-native'
 import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
@@ -27,10 +27,18 @@ function sanitizeDate(date: Date): Date {
   return date
 }
 
-export function StepInfo() {
+export function StepInfo({
+  isLoadingStarterPack,
+}: {
+  isLoadingStarterPack: boolean
+}) {
   const {_} = useLingui()
   const {state, dispatch} = useSignupContext()
 
+  useEffect(() => {
+    LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
+  }, [state.isLoading, isLoadingStarterPack])
+
   return (
     <ScreenTransition>
       <View style={[a.gap_md]}>
@@ -46,7 +54,7 @@ export function StepInfo() {
             }
           />
         </View>
-        {state.isLoading ? (
+        {state.isLoading || isLoadingStarterPack ? (
           <View style={[a.align_center]}>
             <Loader size="xl" />
           </View>