"use client"; import { useState, useEffect } from "react"; import { IoClose } from "react-icons/io5"; export default function ConstructionPopup() { const [isVisible, setIsVisible] = useState(false); const [shouldRender, setShouldRender] = useState(false); useEffect(() => { // Check if the popup has already been shown in this session const hasBeenShown = sessionStorage.getItem("construction_popup_shown"); if (!hasBeenShown) { const timer = setTimeout(() => { setShouldRender(true); setIsVisible(true); }, 3000); return () => clearTimeout(timer); } }, []); const closePopup = () => { setIsVisible(false); // Add a delay to remove from DOM after fade out animation if needed // For now, we'll just hide it and set session storage sessionStorage.setItem("construction_popup_shown", "true"); setTimeout(() => setShouldRender(false), 400); // match animation duration }; if (!shouldRender) return null; return (
We are currently updating our fencing product catalog to serve you better.
👉 For the latest pricing and customized quotes, please contact us.