From af5be1c27609eac0ae82ef15c2aecaa5a1427890 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 25 Apr 2022 12:40:27 -0400 Subject: [PATCH] Remove Lottie --- app/images/circles.json | 1 - app/soapbox/components/lottie.tsx | 28 ---------------------------- app/styles/truth.scss | 7 ------- package.json | 1 - yarn.lock | 5 ----- 5 files changed, 42 deletions(-) delete mode 100644 app/images/circles.json delete mode 100644 app/soapbox/components/lottie.tsx diff --git a/app/images/circles.json b/app/images/circles.json deleted file mode 100644 index 22cd265516..0000000000 --- a/app/images/circles.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.4.3","fr":60,"ip":0,"op":240,"w":840,"h":900,"nm":"合成 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"形状图层 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[420,450,0],"ix":2},"a":{"a":0,"k":[120,120,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[100,100,100],"e":[110,110,100]},{"i":{"x":[0.667,0.667,0.667],"y":[-0.401,-0.401,2.575]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_-0p401_0p333_0","0p667_-0p401_0p333_0","0p667_2p575_0p333_0"],"t":160,"s":[110,110,100],"e":[109.411,109.411,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0.088,0.088,-1.575]},"n":["0p667_1_0p333_0p088","0p667_1_0p333_0p088","0p667_1_0p333_-1p575"],"t":180,"s":[109.411,109.411,100],"e":[100,100,100]},{"t":200}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[69.588,0],[0,-69.588],[-69.588,0],[0,69.588]],"o":[[-69.588,0],[0,69.588],[69.588,0],[0,-69.588]],"v":[[0,-126],[-126,0],[0,126],[126,0]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[120,120],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[420,450,0],"ix":2},"a":{"a":0,"k":[-112,-181,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.313,0.313],"y":[1,1]},"o":{"x":[0.057,0.057],"y":[0,0]},"n":["0p313_1_0p057_0","0p313_1_0p057_0"],"t":95,"s":[240,240],"e":[408,408]},{"i":{"x":[0.496,0.496],"y":[1,1]},"o":{"x":[0.189,0.189],"y":[0,0]},"n":["0p496_1_0p189_0","0p496_1_0p189_0"],"t":180,"s":[408,408],"e":[900,900]},{"t":200}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.7803921568627451,0.8235294117647058,0.996078431372549,1],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":95,"s":[80],"e":[0]},{"t":200}],"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-112,-181],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[420,450,0],"ix":2},"a":{"a":0,"k":[-112,-181,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.418,0.418],"y":[1,1]},"o":{"x":[0.041,0.041],"y":[0,0]},"n":["0p418_1_0p041_0","0p418_1_0p041_0"],"t":60,"s":[240,240],"e":[552,552]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.095,0.095],"y":[0,0]},"n":["0p667_1_0p095_0","0p667_1_0p095_0"],"t":174,"s":[552,552],"e":[900,900]},{"t":194}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8784313725490196,0.9058823529411765,1,1],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":60,"s":[60],"e":[0]},{"t":200}],"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-112,-181],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"形状图层 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[420,450,0],"ix":2},"a":{"a":0,"k":[-112,-181,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.574,0.574],"y":[1,1]},"o":{"x":[0.043,0.043],"y":[0,0]},"n":["0p574_1_0p043_0","0p574_1_0p043_0"],"t":30,"s":[240,240],"e":[696,696]},{"i":{"x":[0.512,0.512],"y":[1,1]},"o":{"x":[0.096,0.096],"y":[0,0]},"n":["0p512_1_0p096_0","0p512_1_0p096_0"],"t":168,"s":[696,696],"e":[900,900]},{"t":188}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9176470588235294,0.9372549019607843,1,1],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":30,"s":[40],"e":[0]},{"t":200}],"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-112,-181],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"形状图层 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[420,450,0],"ix":2},"a":{"a":0,"k":[-112,-181,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.262,0.262],"y":[1,1]},"o":{"x":[0.066,0.066],"y":[0,0]},"n":["0p262_1_0p066_0","0p262_1_0p066_0"],"t":0,"s":[240,240],"e":[840,840]},{"i":{"x":[0.39,0.39],"y":[1,1]},"o":{"x":[0.138,0.138],"y":[0,0]},"n":["0p39_1_0p138_0","0p39_1_0p138_0"],"t":162,"s":[840,840],"e":[900,900]},{"t":182}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9333333333333333,0.9490196078431372,1,1],"ix":4},"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[30],"e":[0]},{"t":200}],"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-112,-181],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":240,"st":0,"bm":0}],"markers":[]} diff --git a/app/soapbox/components/lottie.tsx b/app/soapbox/components/lottie.tsx deleted file mode 100644 index 7c1c8ed556..0000000000 --- a/app/soapbox/components/lottie.tsx +++ /dev/null @@ -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 = ({ animationData, width, height }) => { - const element = useRef(null); - const lottieInstance = useRef(); - - useEffect(() => { - if (element.current) { - lottieInstance.current = lottie.loadAnimation({ - animationData, - container: element.current, - }); - } - }, [animationData]); - - return
; -}; - -export default Lottie; diff --git a/app/styles/truth.scss b/app/styles/truth.scss index 5fb35380a4..8b4eaf5a8f 100644 --- a/app/styles/truth.scss +++ b/app/styles/truth.scss @@ -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; diff --git a/package.json b/package.json index abf5cba9fc..3209553ca2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 94f03c4afa..1c4f91bf3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"