mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Remove unused inviteApi prop so lib interface is not altered
This commit is contained in:
parent
aa99e34ba4
commit
042a158126
@ -221,10 +221,7 @@ function App() {
|
|||||||
<Content>
|
<Content>
|
||||||
<Quests />
|
<Quests />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route
|
<Route path='/*' element={<MapContainer map={map} layers={layers} />}>
|
||||||
path='/*'
|
|
||||||
element={<MapContainer map={map} layers={layers} inviteApi={inviteApi} />}
|
|
||||||
>
|
|
||||||
<Route
|
<Route
|
||||||
path='invite/:id'
|
path='invite/:id'
|
||||||
element={<InvitePage inviteApi={inviteApi} itemsApi={itemsApiInstance} />}
|
element={<InvitePage inviteApi={inviteApi} itemsApi={itemsApiInstance} />}
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import {
|
|||||||
import { itemsApi } from '../api/itemsApi'
|
import { itemsApi } from '../api/itemsApi'
|
||||||
|
|
||||||
import type { Place } from '../api/directus'
|
import type { Place } from '../api/directus'
|
||||||
import type { InviteApi } from '@/api/inviteApi'
|
|
||||||
import type { LayerProps } from 'utopia-ui'
|
import type { LayerProps } from 'utopia-ui'
|
||||||
|
|
||||||
interface layerApi {
|
interface layerApi {
|
||||||
@ -31,15 +30,7 @@ interface layerApi {
|
|||||||
api: itemsApi<Place>
|
api: itemsApi<Place>
|
||||||
}
|
}
|
||||||
|
|
||||||
function MapContainer({
|
function MapContainer({ layers, map }: { layers: LayerProps[]; map: any }) {
|
||||||
layers,
|
|
||||||
map,
|
|
||||||
inviteApi,
|
|
||||||
}: {
|
|
||||||
layers: LayerProps[]
|
|
||||||
map: any
|
|
||||||
inviteApi: InviteApi
|
|
||||||
}) {
|
|
||||||
const [apis, setApis] = useState<layerApi[]>([])
|
const [apis, setApis] = useState<layerApi[]>([])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -96,7 +87,6 @@ function MapContainer({
|
|||||||
expandLayerControl={map.expand_layer_control}
|
expandLayerControl={map.expand_layer_control}
|
||||||
tileServerUrl={map.tile_server_url}
|
tileServerUrl={map.tile_server_url}
|
||||||
tileServerAttribution={map.tile_server_attribution}
|
tileServerAttribution={map.tile_server_attribution}
|
||||||
inviteApi={inviteApi}
|
|
||||||
tilesType={map.tiles_type}
|
tilesType={map.tiles_type}
|
||||||
maplibreStyle={map.maplibre_style}
|
maplibreStyle={map.maplibre_style}
|
||||||
showFullscreenControl={map.show_fullscreen_control}
|
showFullscreenControl={map.show_fullscreen_control}
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper'
|
|||||||
import { useStoredInviteCode } from './hooks/useStoredInviteCode'
|
import { useStoredInviteCode } from './hooks/useStoredInviteCode'
|
||||||
import { UtopiaMapInner } from './UtopiaMapInner'
|
import { UtopiaMapInner } from './UtopiaMapInner'
|
||||||
|
|
||||||
import type { InviteApi } from '#types/InviteApi'
|
|
||||||
import type { GeoJsonObject } from 'geojson'
|
import type { GeoJsonObject } from 'geojson'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,8 +99,6 @@ function UtopiaMap({
|
|||||||
tileServerUrl?: string
|
tileServerUrl?: string
|
||||||
/** configure a custom tile server attribution */
|
/** configure a custom tile server attribution */
|
||||||
tileServerAttribution?: string
|
tileServerAttribution?: string
|
||||||
/** API to redeem invite codes */
|
|
||||||
inviteApi: InviteApi
|
|
||||||
/** tiles type: 'raster' or 'maplibre' (default 'raster') */
|
/** tiles type: 'raster' or 'maplibre' (default 'raster') */
|
||||||
tilesType?: 'raster' | 'maplibre'
|
tilesType?: 'raster' | 'maplibre'
|
||||||
/** MapLibre style URL for vector tiles (default: OpenFreeMap Liberty) */
|
/** MapLibre style URL for vector tiles (default: OpenFreeMap Liberty) */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user