import React, { useEffect, useState } from "react"; import { sendGAEvent } from "@next/third-parties/google"; const CallForce = () => { const [showInfo, setShowInfo] = useState(false); const [showProgressBar, setShowProgressBar] = useState(false); useEffect(() => { const timer = setTimeout(() => { setShowInfo(true); setShowProgressBar(true); const progressBarTimer = setTimeout(() => { setShowProgressBar(false); setShowInfo(false); }, 10000); // 10 ثانیه return () => clearTimeout(progressBarTimer); }, 10000); // 30 ثانیه return () => clearTimeout(timer); // پاک کردن تایمر در هنگام تخریب کامپوننت }, []); return (
sendGAEvent({ event: "buttonClicked", value: "hi" })} >
{showInfo && (

ارتباط مستقیم با دکتر مهرداد نادعلی

وکیل پایه یک دادگستری

)}
); }; export default CallForce;