"use client"; import React from "react"; import { motion } from "motion/react"; import { cn } from "@/lib/utils"; export const BoxesCore = ({ className, ...rest }: { className?: string }) => { const rows = new Array(150).fill(1); const cols = new Array(100).fill(1); let colors = [ "#93c5fd", "#f9a8d4", "#86efac", "#fde047", "#fca5a5", "#d8b4fe", "#93c5fd", "#a5b4fc", "#c4b5fd", ]; const getRandomColor = () => { return colors[Math.floor(Math.random() * colors.length)]; }; return (
{rows.map((_, i) => ( {cols.map((_, j) => ( {j % 2 === 0 && i % 2 === 0 ? ( ) : null} ))} ))}
); }; export const Boxes = React.memo(BoxesCore);