mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
Fix type
This commit is contained in:
parent
5e622c448d
commit
ff18ad3292
@ -1,6 +1,7 @@
|
||||
import { useContext, useMemo, useState } from 'react'
|
||||
import { Marker, Tooltip } from 'react-leaflet'
|
||||
|
||||
import { useAppState } from '#components/AppShell/hooks/useAppState'
|
||||
import {
|
||||
useFilterTags,
|
||||
useIsLayerVisible,
|
||||
@ -33,6 +34,8 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => {
|
||||
|
||||
const filterTags = useFilterTags()
|
||||
|
||||
const appState = useAppState()
|
||||
|
||||
const items = useItems()
|
||||
|
||||
const getItemTags = useGetItemTags()
|
||||
@ -149,7 +152,13 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => {
|
||||
selectPosition && setMarkerClicked(item)
|
||||
},
|
||||
}}
|
||||
icon={MarkerIconFactory(markerShape, color1, color2, item.markerIcon ?? markerIcon)}
|
||||
icon={MarkerIconFactory(
|
||||
markerShape,
|
||||
color1,
|
||||
color2,
|
||||
item.markerIcon ?? markerIcon,
|
||||
appState.assetsApi.url,
|
||||
)}
|
||||
position={[latitude, longitude]}
|
||||
>
|
||||
<ItemViewPopup
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
import { createContext } from 'react'
|
||||
|
||||
import type { MarkerIcon } from '#types/MarkerIcon'
|
||||
|
||||
interface LayerContextType {
|
||||
name: string
|
||||
markerDefaultColor: string
|
||||
markerDefaultColor2: string
|
||||
markerShape: string
|
||||
markerIcon: string
|
||||
menuText: string
|
||||
markerIcon?: MarkerIcon
|
||||
}
|
||||
|
||||
const LayerContext = createContext<LayerContextType>({
|
||||
@ -14,7 +16,6 @@ const LayerContext = createContext<LayerContextType>({
|
||||
markerDefaultColor: '',
|
||||
markerDefaultColor2: '',
|
||||
markerShape: '',
|
||||
markerIcon: '',
|
||||
menuText: '',
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user