aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/maps/styleloader.ts
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-11-17 23:39:08 +0100
committerGitHub <noreply@github.com>2025-11-17 23:39:08 +0100
commit276e73412abef28c222c52a84334d49f5e414f3c (patch)
tree8b7ae07eafa53f9efc5884e4f0696e6077266f48 /src/frontend/app/maps/styleloader.ts
parent36d982fb3b01fd8181b216b57fba2c42e9404d1f (diff)
Use consolidated data API in map sheet with shared card component (#100)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: arielcostas <94913521+arielcostas@users.noreply.github.com> Co-authored-by: Ariel Costas Guerrero <ariel@costas.dev>
Diffstat (limited to 'src/frontend/app/maps/styleloader.ts')
-rw-r--r--src/frontend/app/maps/styleloader.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/frontend/app/maps/styleloader.ts b/src/frontend/app/maps/styleloader.ts
index d20fd31..43118a0 100644
--- a/src/frontend/app/maps/styleloader.ts
+++ b/src/frontend/app/maps/styleloader.ts
@@ -3,10 +3,12 @@ import type { Theme } from "~/AppContext";
export async function loadStyle(
styleName: string,
- colorScheme: Theme,
+ colorScheme: Theme
): Promise<StyleSpecification> {
if (colorScheme == "system") {
- const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
+ const isDarkMode = window.matchMedia(
+ "(prefers-color-scheme: dark)"
+ ).matches;
colorScheme = isDarkMode ? "dark" : "light";
}