File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1- /* eslint-disable react/display-name */
21import React from "react" ;
32import { motion } from "framer-motion" ;
43import svgList from "../constants/icons" ;
54
6- // Memoized icon component to prevent unnecessary re-renders
75const Icon = React . memo ( ( { svg, index } ) => (
86 < motion . div
97 className = "relative w-8 h-8 sm:w-12 sm:h-12"
@@ -30,6 +28,8 @@ const Icon = React.memo(({ svg, index }) => (
3028 </ motion . div >
3129) ) ;
3230
31+ Icon . displayName = "Icon" ;
32+
3333const AnimatedCoding = ( ) => {
3434 const SVGS_PER_ROW = 5 ;
3535 const ROW_HEIGHT = 64 ;
@@ -54,7 +54,7 @@ const AnimatedCoding = () => {
5454 >
5555 { doubledSvgList . map ( ( svg , index ) => (
5656 < div
57- key = { `${ index } -${ svg } ` } // Unique key combining index and SVG path
57+ key = { `${ index } -${ svg } ` }
5858 className = "w-full h-full flex justify-center items-center"
5959 >
6060 < Icon svg = { svg } index = { index } />
You can’t perform that action at this time.
0 commit comments