"use client" import Link from "next/link" import { Component } from "@/lib/get-components" import Floating, { FloatingElement, } from "@/fancy/components/image/parallax-floating" import HoverVideo from "./hover-video" export function HeroImages({ allComps }: { allComps: Component[] }) { if (!Array.isArray(allComps)) { console.error("allComps is not an array:", allComps) return null } const getComp = (name: string) => { const comp = allComps.find((comp) => comp.name === name) if (!comp) { console.error(`Component ${name} not found`) return null } return comp } const preLink = "/docs/components" // Safely get component data with null checks const imageTrail = getComp("image-trail"); const textHighlighter = getComp("text-highlighter"); const gravity = getComp("gravity"); const cssBox = getComp("css-box"); const marqueePath = getComp("marquee-along-svg-path"); if (!imageTrail || !textHighlighter || !gravity || !cssBox || !marqueePath) { console.error("One or more required components not found"); return null; } return ( ) }