"use client"; import { motion, useReducedMotion } from "motion/react"; type InfinityFlowProps = { className?: string; color?: string; /** Loader width in pixels; height is half of it. */ size?: number; /** 1 is the default pace; 2 is twice as fast. */ speed?: number; /** Read out by screen readers. */ label?: string; }; // Figure-eight in a 100 x 50 box. const PATH = "M50 25 C62 8 88 8 88 25 C88 42 62 42 50 25 C38 8 12 8 12 25 C12 42 38 42 50 25 Z"; /* InfinityFlow: a glowing streak runs endlessly along a figure-eight track. */ export function InfinityFlow({ className = "", color = "#a78bfa", size = 96, speed = 1, label = "Loading", }: InfinityFlowProps) { const reduce = useReducedMotion(); const flow = { duration: (reduce ? 8 : 2) / speed, repeat: Infinity, ease: "linear" as const }; return (
{label}
); }