feat(dashboard): auto light/dark mode
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m13s

impelemnt auto light/dark mode based on lat/lon

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-31 01:58:57 +00:00
parent 30cd1c2815
commit 9edda5808f
3 changed files with 114 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ import {
stepToBrightness,
} from "./light-control"
import { StatusSeverity, TubeLine, formatLineName, tflDisruptionsQuery } from "./tfl"
import { useAutoTheme } from "./use-auto-theme"
import {
DEFAULT_LATITUDE,
DEFAULT_LONGITUDE,
@@ -32,6 +33,8 @@ function App() {
const store = useStore()
useAutoTheme(DEFAULT_LATITUDE, DEFAULT_LONGITUDE)
useEffect(() => {
const ws = websocket.current