0

I have custom icons in the public folder of the webapp, my problem is I don't know how to attach the file path to routes.ts. In the icon property under routes object I can't add the file path of the SVG icon from the public folder (example: icon:'public/dashicon.svg') it gives me warnings every time I tried to add the custom icon file path in routes.ts

routes: [
          {
            path: '/dashboard',
            name: 'Dashboard',
            icon: 'dashboard',
            component: './dashboard',
            authority: [
              'admin',
              'user'
            ],
          }

I'm using Ant design framework for my webapp. hopefully you can help me. thanks

Melvin Rey
  • 147
  • 3
  • 17
  • Does this answer your question? [How to add local Icons to menus in reactjs?](https://stackoverflow.com/questions/60162885/how-to-add-local-icons-to-menus-in-reactjs) – keikai Feb 13 '20 at 02:02
  • Maybe this will help you: https://stackoverflow.com/questions/44717164/unable-to-import-svg-files-in-typescript – Osama Rashid Feb 18 '20 at 13:44

0 Answers0