<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: C S</title>
    <description>The latest articles on DEV Community by C S (@c_s_a05d625d9847386de165b).</description>
    <link>https://dev.to/c_s_a05d625d9847386de165b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1024157%2F06fb25f6-e278-448f-be76-bf8186b50f05.png</url>
      <title>DEV Community: C S</title>
      <link>https://dev.to/c_s_a05d625d9847386de165b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/c_s_a05d625d9847386de165b"/>
    <language>en</language>
    <item>
      <title>Why is my cursor pointer disabled on &lt;button&gt; after refresh? | React App</title>
      <dc:creator>C S</dc:creator>
      <pubDate>Fri, 10 Feb 2023 09:52:33 +0000</pubDate>
      <link>https://dev.to/c_s_a05d625d9847386de165b/why-is-my-cursor-pointer-disabled-on-after-refresh-react-app-344h</link>
      <guid>https://dev.to/c_s_a05d625d9847386de165b/why-is-my-cursor-pointer-disabled-on-after-refresh-react-app-344h</guid>
      <description>&lt;p&gt;Hi, I'm hoping someone might be able to resolve this...&lt;/p&gt;

&lt;p&gt;I'm trying to build a Uniswap Clone with React &amp;amp; Tailwind CSS, and I have created a "Connect Wallet" button that triggers a MetaMask popup to connect wallet. Everything else seems to be working fine, but...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My issue is, when I fully refresh the web application page, my cursor pointer becomes disabled when I hover over the "Connect Wallet" button.&lt;/strong&gt; Basically, my cursor stays at the default arrow pointer mode, doesn't change to cursor pointer, and I am unable to click the button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PVnFlRZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgz42m1hk83rsf3xkzbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PVnFlRZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgz42m1hk83rsf3xkzbh.png" alt="Image of App in Chrome Browser" width="880" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Interestingly enough, when I refresh the page and &lt;em&gt;quickly&lt;/em&gt; place my mouse over the Connect Wallet button, I am briefly able to click the button and open the the MetaMask Pop-up as usual. But, when the page is fully refreshed, the cursor goes back to the normal/default arrow pointer and I am unable to click the button.&lt;/p&gt;

&lt;p&gt;Anybody have any idea of what might be causing this, and how I may be able to resolve it?&lt;/p&gt;




&lt;p&gt;_PS: I tried to add "cursor-pointer" class to my button. I thought it would force the cursor to change to pointer on hover, but this didn't fix the problem. _&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's my React code block for the button function:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const WalletButton = () =&amp;gt; {
  const [rendered, setRendered] = useState('');

  const {ens} = useLookupAddress();
  const {account, activateBrowserWallet, deactivate} = useEthers();

  return (
    &amp;lt;button
      onClick={() =&amp;gt; {
        if (!account) {
          activateBrowserWallet();
        } else {
          deactivate();
        }
      }}
      className={styles.walletButton}
    &amp;gt;
      {rendered === "" &amp;amp;&amp;amp; "Connect Wallet"}
      {rendered !== "" &amp;amp;&amp;amp; rendered}
    &amp;lt;/button&amp;gt;
  );
};

export default WalletButton
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;And here is the tailwind css styles that are currently applied to the button:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// WalletButton
  walletButton:
    "bg-site-pink border-none outline-none px-6 py-2 font-poppins font-bold text-lg text-white rounded-3xl leading-[24px] hover:bg-pink-600 transition-all",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope I have given enough context and details. Any help or suggestions would be much appreciated. Thank you.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>tailwindcss</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
