From ebf48311ab0f89d3453f11a14255784405b1392f Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Wed, 19 Mar 2025 15:41:57 +0000 Subject: [PATCH] fixed LocateControl and added react-inlinesvg to external dependencies --- rollup.config.js | 1 + src/Components/Map/Subcomponents/Controls/LocateControl.tsx | 4 ++-- src/assets/target.svg | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 05dd097b..dac65839 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -76,6 +76,7 @@ export default [ 'leaflet.locatecontrol/dist/L.Control.Locate.css', 'yet-another-react-lightbox', 'react-photo-album', + 'react-inlinesvg', ], }, { diff --git a/src/Components/Map/Subcomponents/Controls/LocateControl.tsx b/src/Components/Map/Subcomponents/Controls/LocateControl.tsx index db555bf2..ace5b9e0 100644 --- a/src/Components/Map/Subcomponents/Controls/LocateControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/LocateControl.tsx @@ -6,6 +6,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ import { control } from 'leaflet' import { useEffect, useRef, useState } from 'react' +import SVG from 'react-inlinesvg' import { useMap, useMapEvents } from 'react-leaflet' import TargetSVG from '#assets/target.svg' @@ -58,9 +59,8 @@ export const LocateControl = () => { {loading ? ( ) : ( - x diff --git a/src/assets/target.svg b/src/assets/target.svg index 711e071b..12418655 100644 --- a/src/assets/target.svg +++ b/src/assets/target.svg @@ -5,4 +5,4 @@ xmlns='http://www.w3.org/2000/svg' > - \ No newline at end of file +