"use client"; import { useState, useEffect, useCallback } from "react"; import Image from "next/image"; import { X } from "lucide-react"; export default function NewspaperClipping() { const [open, setOpen] = useState(false); const close = useCallback(() => setOpen(false), []); useEffect(() => { if (!open) return; const handleKey = (e: KeyboardEvent) => { if (e.key === "Escape") close(); }; document.addEventListener("keydown", handleKey); document.body.style.overflow = "hidden"; return () => { document.removeEventListener("keydown", handleKey); document.body.style.overflow = ""; }; }, [open, close]); return ( <>
setOpen(true)} > Budd Electric Co. featured in the local newspaper
Click to enlarge

Featured in the local press

{open && (
e.stopPropagation()} > Budd Electric Co. featured in the local newspaper
)} ); }