Skip to content

Commit

Permalink
Animation modifications #43
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed7am1d committed May 5, 2023
1 parent 4c6f8bc commit 0f31c02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
17 changes: 3 additions & 14 deletions socialchain.client/components/Animations/LottieAnimation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useRef } from "react";
import Lottie from "lottie-web";
export const LottieAnimation = ({fileName, width,divId}) => {
export const LottieAnimation = ({fileName, width,divId,animationTitle, animationDescription}) => {
const ref = useRef(null);
useEffect(() => {
if (ref.current) {
Expand All @@ -17,8 +17,8 @@ export const LottieAnimation = ({fileName, width,divId}) => {
progressiveLoad: true,
preserveAspectRatio: "xMidYMid meet",
imagePreserveAspectRatio: "xMidYMid meet",
title: "TEST TITLE",
description: "TEST DESCRIPTION",
title: animationTitle,
description: animationDescription,
},
path: fileName,
});
Expand All @@ -27,17 +27,6 @@ export const LottieAnimation = ({fileName, width,divId}) => {
console.log(errorType);
};

anim.addEventListener("error", function (error) {
console.log(error);
});

anim.addEventListener("error", function (error) {
console.log(error);
});

anim.addEventListener("DOMLoaded", function () {
console.log("DOMLoaded");
});
}, []);
return (
<div
Expand Down
4 changes: 4 additions & 0 deletions socialchain.client/pages/login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ const login = () => {
fileName="blockchainPerformanceAnimation.json"
width={200}
divId="blockchainPerformanceAnimation"
animationTitle="Performance"
animationDescription="Performance animation"
/>
</div>
<h1 className="text-2xl font-semibold text-white">Performance</h1>
Expand Down Expand Up @@ -718,6 +720,8 @@ const login = () => {
fileName="106808-blockchain.json"
width={200}
divId="106808-blockchain"
animationTitle="Blockchain"
animationDescription="Blockchain animation"
/>
</div>
<h1 className="text-2xl font-semibold text-white">
Expand Down

0 comments on commit 0f31c02

Please sign in to comment.