Skip to content

Commit

Permalink
fix: let it be configurable too
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Dec 29, 2023
1 parent 4ad64ca commit 268f7d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hooks/useTileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useStatic, useStore } from '@hooks/useStore'

/**
*
* @param {Record<string, { name: string, style: 'light' | 'dark', attribution?: string, url?: string }>} tileServers
* @param {Record<string, { name: string, style: 'light' | 'dark', attribution?: string, url?: string, background?: string }>} tileServers
* @param {string} tileServer
* @param {'day' | 'night' | 'dusk' | 'dawn'} timeOfDay
* @returns
Expand Down Expand Up @@ -57,7 +57,8 @@ export default function useTileLayer() {
.item(0)
if (leafletContainerEl instanceof HTMLElement) {
leafletContainerEl.style.background =
tileLayer.style === 'dark' ? '#0F0D0D' : '#ddd'
tileLayer.background ??
(tileLayer.style === 'dark' ? '#0F0D0D' : '#ddd')
}
}, [tileLayer.style])

Expand Down

0 comments on commit 268f7d8

Please sign in to comment.