const [clientSecret, setClientSecret] = useState<string>();
  useEffect(()=>{
    fetch(`${BASE_URL}/payment/create_stripe_intent`,{
      method:"POST",
      body: JSON.stringify({ payment_amount }),
    })
    .then(async(response)=>{
      const data = await  response.json();
      console.log(data.result.client_secret);
      setClientSecret(data.result.client_secret)
    })
    
  },[]);
The payment intent was created twice as every time my page loading. what issue am facing?
can anyone pls help.
 
    
