Skip to content

Commit 1e740f0

Browse files
authored
Merge pull request #10 from Abhishekk24/feature
UI Enhancements and Animation Updates
2 parents 782379f + 568d3be commit 1e740f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Success.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from "react";
1+
import React, { useEffect, useState, useMemo } from "react";
22
import "../styles/Success.css";
33

44
const Achievement = ({ id, position, isVisible, heading, description, pinPosition }) => {
@@ -44,7 +44,7 @@ const Achievement = ({ id, position, isVisible, heading, description, pinPositio
4444
};
4545

4646
const Success = () => {
47-
const achievements = [
47+
const achievements = useMemo(() => [
4848
{
4949
id: 1,
5050
position: { top: "40%", left: "15%" }, // Position for title and description
@@ -101,7 +101,7 @@ const Success = () => {
101101
description: "Q2 2025",
102102
pinPosition: { top: "37%", right: "27%" }, // Custom pin position for ID 8
103103
},
104-
];
104+
], []);
105105

106106
const [visibleSteps, setVisibleSteps] = useState([]);
107107

0 commit comments

Comments
 (0)