"use client"; import React from "react"; import { motion } from "framer-motion"; 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 = [ "--sky-300", "--pink-300", "--green-300", "--yellow-300", "--red-300", "--purple-300", "--blue-300", "--indigo-300", "--violet-300", ]; 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);