Skip to content

Commit

Permalink
tested if this code-change lowers the complexity for tsc to an accept…
Browse files Browse the repository at this point in the history
…able level
  • Loading branch information
CommanderStorm committed Aug 2, 2024
1 parent 7d01e41 commit f4e703b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion webclient/app/components/DetailsInteractiveMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ function loadInteractiveMap() {
const coords = props.data.coords;
if (map.value !== undefined) {
// @ts-expect-error somehow this is too deep for typescript
marker.value.setLngLat([coords.lon, coords.lat]).addTo(map.value as Map);
marker.value.setLngLat([coords.lon, coords.lat]);
marker.value.addTo(map.value as Map);
}
const overlays = props.data.maps?.overlays;
Expand Down
4 changes: 2 additions & 2 deletions webclient/app/components/IndoorMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ async function loadInteractiveMap() {
marker.value = new Marker({ element: createMarker() });
const coords = props.data.coords;
if (map.value !== undefined) {
// @ts-expect-error somehow this is too deep for typescript
marker.value.setLngLat([coords.lon, coords.lat]).addTo(map.value as MaplibreMapWithIndoor);
marker.value.setLngLat([coords.lon, coords.lat]);
marker.value.addTo(map.value as MaplibreMapWithIndoor);
}
const defaultZooms: { [index: string]: number | undefined } = {
Expand Down
4 changes: 2 additions & 2 deletions webclient/app/pages/next.client.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const { data } = useFetch<DetailsResponse, string>(url, {
<template>
<Suspense>
<IndoorMap v-if="data" :data="data" />
<NuxtLoadingIndicator v-else />
<Spinner v-else class="h-8 w-8" />
<template #fallback>
<NuxtLoadingIndicator />
<Spinner class="h-8 w-8" />
</template>
</Suspense>
</template>

0 comments on commit f4e703b

Please sign in to comment.