diff --git a/src/components/App/Splash/SpiningSphere/index.tsx b/src/components/App/Splash/SpiningSphere/index.tsx index 72df649ae..c62c8af22 100644 --- a/src/components/App/Splash/SpiningSphere/index.tsx +++ b/src/components/App/Splash/SpiningSphere/index.tsx @@ -1,20 +1,37 @@ +import { useEffect, useState } from 'react' import Lottie from 'react-lottie' import { Flex } from '~/components/common/Flex' import preloadData from './preloader.json' -export const SphereAnimation = () => ( - - - -) +export const SphereAnimation = () => { + const [isReady, setIsReady] = useState(false) + + useEffect(() => { + setIsReady(true) + + return () => { + setIsReady(false) + } + }, []) + + if (!isReady) { + return <> + } + + return ( + + + + ) +} diff --git a/src/components/App/Splash/index.tsx b/src/components/App/Splash/index.tsx index 0d49642f3..fe617ce30 100644 --- a/src/components/App/Splash/index.tsx +++ b/src/components/App/Splash/index.tsx @@ -10,6 +10,7 @@ import { useDataStore } from '~/stores/useDataStore' import { colors, formatSplashMessage, formatStatsResponse } from '~/utils' import { AnimatedTextContent } from './animated' import { initialMessageData, Message } from './constants' +import { SphereAnimation } from './SpiningSphere' export const Splash = () => { const [message, setMessage] = useState(initialMessageData) @@ -69,7 +70,7 @@ export const Splash = () => { return ( - {/* */} + {appMetaData?.title}