react-leaflet icon indicating copy to clipboard operation
react-leaflet copied to clipboard

Icon does not show: Nextjs + Leaflet bug?

Open Tarshh opened this issue 1 year ago • 11 comments

Bug report in v4

Before opening an issue, make sure to read the contributing guide and understand this is a bug tracker, not a support platform.

Please make sure to check the following boxes before submitting an issue.
Issues opened without using this template will be closed unless they have a good reason not to follow this template.

  • [X ] All peer dependencies are installed: React, ReactDOM and Leaflet.
  • [X ] Using the latest version of React and ReactDOM v18.
  • [ X] Using the supported version of Leaflet (v1.8.0 minimum) and its corresponding CSS file is loaded.
  • [ X] Using the latest v4 version of React-Leaflet.
  • [x] The issue has not already been reported.
  • [ X] Make sure you have followed the quick start guide for Leaflet.
  • [ ]X Make sure you have fully read the documentation and that you understand the limitations.

Expected behavior

Get an icon to show up. The default one or a custom one. Both don't work.

Actual behavior

It's a simple one. I'm trying to get the Icon to work. The default icon does not show up. Also the custom icon (where the path is correct) does not show up.

https://github.com/Tarshh/waar-laden/blob/master/src/components/Map/Map.tsx This is the file, the css is loaded on the page itself. Changing the place where the CSS loads does not work either. I know Leaflet does not work with SSR, hence the "use client" on top of the file

I'm 99% sure everything is installed correctly?

Steps to reproduce

Here is the full repo. https://github.com/Tarshh/waar-laden I'm thinking that the issue is a combination with Nextjs and Leaflet? I tried making a new project just now and have the same result.

Thanks in advance...

Tarshh avatar Jun 18 '23 19:06 Tarshh