Skip to content

Commit

Permalink
chore:
Browse files Browse the repository at this point in the history
  • Loading branch information
williamluke4 committed Aug 24, 2024
1 parent 7a31ba9 commit f0984be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/components/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Marker,
TileLayer,
Tooltip,
useMap,
useMapEvents,
type MapContainerProps,
} from "react-leaflet";
Expand Down Expand Up @@ -37,7 +38,12 @@ function Map<T = object>({
useMapEvents(mapEvents || {});
return null;
};
const RemoveWaterMark = () => {
const map = useMap();
map.attributionControl.setPrefix("");

return null;
};
return (
<MapContainer
center={[0, 38]}
Expand Down Expand Up @@ -66,6 +72,7 @@ function Map<T = object>({
</Marker>
))}
<MapEvents />
<RemoveWaterMark />
</MapContainer>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/location-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const SearchControl = (props: {
});
React.useEffect(() => {
map.addControl(searchControl);

map.attributionControl.setPrefix('')
return () => {
map.removeControl(searchControl);
};
Expand Down

0 comments on commit f0984be

Please sign in to comment.