-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2309 from stakwork/fix/login-private-graph
fix: authentication for private graph
- Loading branch information
Showing
6 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
import Lottie from 'react-lottie' | ||
import lottie, { AnimationItem } from 'lottie-web' | ||
import { Flex } from '~/components/common/Flex' | ||
|
||
import { useEffect, useRef } from 'react' | ||
import preloadData from './preloader.json' | ||
|
||
export const SphereAnimation = () => ( | ||
<Flex style={{ width: '167px', height: '167px', opacity: 0.5 }}> | ||
<Lottie | ||
height={167} | ||
options={{ | ||
export const SphereAnimation = () => { | ||
const lottieRef = useRef<AnimationItem | null>(null) | ||
|
||
useEffect(() => { | ||
const container = document.getElementById('lottie-sphere-animation') | ||
|
||
if (container) { | ||
lottieRef.current = lottie.loadAnimation({ | ||
container, | ||
animationData: preloadData, | ||
loop: true, | ||
autoplay: true, | ||
animationData: preloadData, | ||
rendererSettings: { | ||
preserveAspectRatio: 'xMidYMid slice', | ||
}, | ||
}} | ||
width={167} | ||
/> | ||
</Flex> | ||
) | ||
}) | ||
} | ||
|
||
return () => { | ||
if (lottieRef.current) { | ||
lottieRef.current.destroy() | ||
} | ||
} | ||
}, []) | ||
|
||
return <Flex id="lottie-sphere-animation" style={{ width: '167px', height: '167px', opacity: 0.5 }} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters