title: how can i download the picture when i click the button
body: <p>In some instances it downloads the image but the image does not open</p>
  <p>I tried many methods but no good result</p>
  <p>when i click the button it will download</p>
  <pre><code>import React, {useState, useEffect} from &quot;react&quot;;
  import { mockComponent } from &quot;react-dom/test-utils&quot;;
  import '../App.css';
  import Tabbar from './Tabbar';
  import ClimbingBoxLoader from &quot;react-spinners/ClimbingBoxLoader&quot;;
   
  
  const HomePage = () =&gt; {
       return (
         &lt;div className=&quot;slider&quot;&gt;
           &lt;div className=&quot;myloader&quot;&gt;
           {
             loading ? (
             &lt;ClimbingBoxLoader 
             color={'deepskyblue'}
             loading={loading}
             size={30}
             /&gt;
             ): (
             &lt;div className=&quot;slider&quot;&gt;&lt;Tabbar /&gt;&lt;div className=&quot;load&quot;&gt;&lt;/div&gt;&lt;div className=&quot;content btn-shine&quot;&gt;
                   &lt;img src=&quot;https://cdn.discordapp.com/attachments/935211021285613668/947869684705918976/the-witcher-3-wild-hunt-geralt-of-rivia-vedmak-3-dikaia-ok-1.jpg&quot;/&gt;
                   &lt;a&gt;&lt;button className=&quot;glow-on-hover&quot;&gt;Categories&lt;/button&gt;&lt;/a&gt;
  
             &lt;/div&gt;&lt;/div&gt;
             )
           }
       &lt;/div&gt;
       &lt;/div&gt;
       )
   }
   export default HomePage;
  </code></pre>