"use client"; import { motion, MotionValue, useMotionTemplate, useMotionValue, } from "framer-motion"; import type { Project } from "contentlayer/generated"; import Link from "next/link"; const Flashlight: React.FC<{ x: MotionValue; y: MotionValue; }> = ({ x, y }) => { let maskImage = useMotionTemplate`radial-gradient(320px at ${x}px ${y}px, white, transparent)`; let style = { maskImage, WebkitMaskImage: maskImage }; return (
); }; export const Card: React.FC<{ project: Project }> = ({ project }) => { const mouseX = useMotionValue(0); //randomBetween(rect?.left, rect?.right)); const mouseY = useMotionValue(0); //randomBetween(rect?.top, rect?.bottom)); function onMouseMove({ currentTarget, clientX, clientY }: any) { const { left, top } = currentTarget.getBoundingClientRect(); mouseX.set(clientX - left); mouseY.set(clientY - top); } return ( {project.date ? ( ) : ( SOON )}

{project.title}

{project.description}

); };