diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index ed612563..5bab58fb 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -5,8 +5,8 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper' import { UtopiaMapInner } from './UtopiaMapInner' -import type { UtopiaMapProps } from '#types/UtopiaMapProps' import 'react-toastify/dist/ReactToastify.css' +import type { GeoJsonObject } from 'geojson' /** * @category Map @@ -21,9 +21,19 @@ function UtopiaMap({ showFilterControl = false, showGratitudeControl = false, showLayerControl = true, - infoText, donationWidget, -}: UtopiaMapProps) { +}: { + height?: string + width?: string + center?: [number, number] + zoom?: number + children?: React.ReactNode + geo?: GeoJsonObject + showFilterControl?: boolean + showLayerControl?: boolean + showGratitudeControl?: boolean + donationWidget?: boolean +}) { return ( {children} diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index 927a7865..685979e7 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -36,8 +36,7 @@ import { TextView } from './Subcomponents/ItemPopupComponents/TextView' import { SelectPosition } from './Subcomponents/SelectPosition' import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' -import type { UtopiaMapProps } from '#types/UtopiaMapProps' -import type { Feature, Geometry as GeoJSONGeometry } from 'geojson' +import type { Feature, Geometry as GeoJSONGeometry, GeoJsonObject } from 'geojson' export function UtopiaMapInner({ children, @@ -46,7 +45,14 @@ export function UtopiaMapInner({ showGratitudeControl = false, showLayerControl = true, donationWidget, -}: UtopiaMapProps) { +}: { + children?: React.ReactNode + geo?: GeoJsonObject + showFilterControl?: boolean + showLayerControl?: boolean + showGratitudeControl?: boolean + donationWidget?: boolean +}) { const selectNewItemPosition = useSelectPosition() const setSelectNewItemPosition = useSetSelectPosition() const setClusterRef = useSetClusterRef() diff --git a/src/types/UtopiaMapProps.d.ts b/src/types/UtopiaMapProps.d.ts deleted file mode 100644 index cbcf02ce..00000000 --- a/src/types/UtopiaMapProps.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Tag } from './Tag' -import type { GeoJsonObject } from 'geojson' - -export interface UtopiaMapProps { - height?: string - width?: string - center?: [number, number] - zoom?: number - tags?: Tag[] - children?: React.ReactNode - geo?: GeoJsonObject - showFilterControl?: boolean - showLayerControl?: boolean - showGratitudeControl?: boolean - infoText?: string - donationWidget?: boolean -}