title: How to add local Icons to menus in reactjs?
body: <p>Currently, we are using reactjs in our webapp and we are using default icons from ant design, we have a new Icon design and I already added the SVG icons in the Public folder. The problem is I can’t add my local icons from the public folder to routes.ts where the navigation menus are located. I tried adding the file path of the icons value <strong>icon: “../dashboard_poker_cards.svg”</strong> (Please see attached screenshot of javascript object menu). I tried a different way of adding the file path in the value of the icon but still won’t show the local icon</p>
  
  <p><a href="https://i.stack.imgur.com/XHRMf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XHRMf.png" alt="enter image description here"></a></p>
  
  <p>I tried also importing the file path in the top of routes.ts but I get warning “declared but its value never read.”</p>
  
  <hr>
  
  <p>I added const at the top of routes.ts</p>
  
  <pre><code>const dashIcon = require('/dashboard_poker_cards.svg');
  </code></pre>
  
  <p>and added value in icon: <code>icon: 'dashIcon'</code></p>
  
  <p><strong><em>Result: 'dashIcon' is declared but its value is never read.</em></strong></p>