|
@@ -1,41 +1,26 @@
|
|
|
import styled from '@emotion/styled'
|
|
|
-import loadable from '@loadable/component'
|
|
|
-import React, { useEffect, useState } from 'react'
|
|
|
+import React from 'react'
|
|
|
|
|
|
-const LoadableLottie = loadable(() => import('react-lottie-player'), {
|
|
|
- fallback: <>LOADING LOTTIE</>,
|
|
|
-})
|
|
|
-export const Animations = () => {
|
|
|
- const [XL, setXL] = useState<object | undefined>()
|
|
|
- const [L, setL] = useState<object | undefined>()
|
|
|
- const [M, setM] = useState<object | undefined>()
|
|
|
- const [S, setS] = useState<object | undefined>()
|
|
|
- const [XS, setXS] = useState<object | undefined>()
|
|
|
-
|
|
|
- useEffect(() => {
|
|
|
- import('@/shared/animations/loader-XL.json').then((loader) => setXL(loader.default))
|
|
|
- import('@/shared/animations/loader-L.json').then((loader) => setL(loader.default))
|
|
|
- import('@/shared/animations/loader-M.json').then((loader) => setM(loader.default))
|
|
|
- import('@/shared/animations/loader-S.json').then((loader) => setS(loader.default))
|
|
|
- import('@/shared/animations/loader-XS.json').then((loader) => setXS(loader.default))
|
|
|
- }, [])
|
|
|
+import { AnimatedError, Loader } from '@/shared/components'
|
|
|
|
|
|
+export const Animations = () => {
|
|
|
return (
|
|
|
<Container>
|
|
|
- ANIMATIONS
|
|
|
- <LoadableLottie loop play animationData={XL} />
|
|
|
- <LoadableLottie loop play animationData={L} />
|
|
|
- <LoadableLottie loop play animationData={M} />
|
|
|
- <LoadableLottie loop play animationData={S} />
|
|
|
- <LoadableLottie loop play animationData={XS} />
|
|
|
+ <Loader variant="xlarge" />
|
|
|
+ <Loader variant="large" />
|
|
|
+ <Loader variant="medium" />
|
|
|
+ <Loader variant="small" />
|
|
|
+ <Loader variant="xsmall" />
|
|
|
+ <Loader variant="player" />
|
|
|
+ <AnimatedError />
|
|
|
</Container>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
const Container = styled.div`
|
|
|
- display: grid;
|
|
|
- grid-gap: 32px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: start;
|
|
|
+ gap: 32px;
|
|
|
justify-content: center;
|
|
|
- text-align: center;
|
|
|
- grid-template-rows: auto 1fr 1fr 64px 32px 48px 48px;
|
|
|
`
|