Skip to content

Commit 1650710

Browse files
Refactor AnimatedGridPattern component: remove redundant dependency and ensure consistent parameter initialization
1 parent eace9fd commit 1650710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/magicui/animated-grid-pattern.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-explicit-any */
21
"use client";
32

43
import { motion } from "motion/react";
@@ -35,6 +34,7 @@ export function AnimatedGridPattern({
3534
className,
3635
maxOpacity = 0.5,
3736
duration = 4,
37+
repeatDelay = 0.5,
3838
...props
3939
}: AnimatedGridPatternProps) {
4040
const id = useId();
@@ -76,12 +76,12 @@ export function AnimatedGridPattern({
7676
if (dimensions.width && dimensions.height) {
7777
setSquares(generateSquares(numSquares));
7878
}
79-
}, [dimensions, numSquares, generateSquares]);
79+
}, [dimensions, numSquares]);
8080

8181
// Resize observer to update container dimensions
8282
useEffect(() => {
8383
const resizeObserver = new ResizeObserver((entries) => {
84-
for (const entry of entries) {
84+
for (let entry of entries) {
8585
setDimensions({
8686
width: entry.contentRect.width,
8787
height: entry.contentRect.height,

0 commit comments

Comments
 (0)