Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Commit aef789f

Browse files
authored
Removed the react-lottie library and replaced with the new lottie-react lib (#16)
Removed the react-lottie library and replaced with the new lottie-react library
1 parent 02fbf09 commit aef789f

File tree

3 files changed

+22
-41
lines changed

3 files changed

+22
-41
lines changed

frontend/package-lock.json

Lines changed: 13 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"@types/react": "^18.2.0",
1515
"@types/react-dom": "^18.2.1",
1616
"aws-amplify": "^5.2.5",
17+
"lottie-react": "^2.4.0",
1718
"react": "^18.2.0",
1819
"react-dom": "^18.2.0",
19-
"react-lottie": "^1.2.3",
2020
"react-redux": "^8.1.0",
2121
"react-router-dom": "^6.10.0",
2222
"react-scripts": "5.0.1",

frontend/src/screens/Landing/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ import { Button, Toggle, ToastNotification, InlineNotification } from "@carbon/r
44
import { Login } from '@carbon/icons-react';
55
import { signIn } from "../../services/AuthService";
66
import './Landing.scss';
7-
import LottieLoader from "../../components/LottieLoader";
7+
import { useLottie } from "lottie-react";
88
import silvaLottie from "../../assets/lotties/silva-logo-lottie-1.json"
99

1010
const Landing: React.FC = () => {
11-
11+
// Adding the Lottie Loader and loading the View for lottie with initial options
12+
const options = {
13+
animationData: silvaLottie,
14+
loop: true
15+
};
16+
const { View } = useLottie(options);
1217
return (
1318
<>
1419
<div className="container-fluid">
@@ -90,7 +95,7 @@ const Landing: React.FC = () => {
9095
</div>
9196
<div className="col-lg-5">
9297
<div className="lottie-container">
93-
<LottieLoader animationData={silvaLottie}/>
98+
{View}
9499
</div>
95100
</div>
96101
</div>

0 commit comments

Comments
 (0)