sforkowany z mirror/soapbox
Remove Lottie
rodzic
272c3c0f6d
commit
af5be1c276
File diff suppressed because one or more lines are too long
|
@ -1,28 +0,0 @@
|
|||
import lottie from 'lottie-web';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
interface LottieProps {
|
||||
animationData: any
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
/** Wrapper around lottie-web */
|
||||
// https://github.com/chenqingspring/react-lottie/issues/139
|
||||
const Lottie: React.FC<LottieProps> = ({ animationData, width, height }) => {
|
||||
const element = useRef<HTMLDivElement>(null);
|
||||
const lottieInstance = useRef<any>();
|
||||
|
||||
useEffect(() => {
|
||||
if (element.current) {
|
||||
lottieInstance.current = lottie.loadAnimation({
|
||||
animationData,
|
||||
container: element.current,
|
||||
});
|
||||
}
|
||||
}, [animationData]);
|
||||
|
||||
return <div style={{ width, height }} ref={element} />;
|
||||
};
|
||||
|
||||
export default Lottie;
|
|
@ -252,13 +252,6 @@ body,
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.lottie-wrapper {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
margin-left: -410px;
|
||||
margin-top: -40px;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
position: relative;
|
||||
padding-top: 10px;
|
||||
|
|
|
@ -133,7 +133,6 @@
|
|||
"line-awesome": "^1.3.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash": "^4.7.11",
|
||||
"lottie-web": "^5.9.2",
|
||||
"mark-loader": "^0.1.6",
|
||||
"marky": "^1.2.1",
|
||||
"mini-css-extract-plugin": "^1.6.2",
|
||||
|
|
|
@ -7166,11 +7166,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3
|
|||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
lottie-web@^5.9.2:
|
||||
version "5.9.2"
|
||||
resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.9.2.tgz#38db3f3f3655802c465d725a359fc9d303e31335"
|
||||
integrity sha512-YnoJIKCdKIzno8G/kONOpADW6H/ORZV9puy3vWOhWmHtbDcpISFGVvvdKKa2jwAcsVqXK4xSi0po730kAPIfBw==
|
||||
|
||||
lower-case@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28"
|
||||
|
|
Ładowanie…
Reference in New Issue