File tree Expand file tree Collapse file tree
packages/map/components/Markers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,9 +38,8 @@ export const StationMarker = ({ station }: StationMarkerProps) => {
3838 const { colorScheme } = useMantineColorScheme ( ) ;
3939
4040 let botIcon = "/markers/icon-bot-simrail.jpg" ;
41- if ( colorScheme === "dark" )
41+ if ( colorScheme === "dark" || colorScheme === "auto" && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches )
4242 botIcon = "/markers/icon-bot-simrail-dark.jpg" ;
43- // window.matchMedia('(prefers-color-scheme: dark)').matches incase colorScheme === auto we need to see what the system uses
4443
4544 const icon = L . icon ( {
4645 iconUrl : station . DispatchedBy [ 0 ] && avatar ? avatar : botIcon ,
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ const TrainMarker = ({ train }: TrainMarkerProps) => {
3333
3434 const { colorScheme } = useMantineColorScheme ( ) ;
3535
36+
3637 let botIcon = "/markers/icon-bot-simrail.jpg" ;
37- if ( colorScheme === "dark" )
38+ if ( colorScheme === "dark" || colorScheme === "auto" && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches )
3839 botIcon = "/markers/icon-bot-simrail-dark.jpg" ;
39- // window.matchMedia('(prefers-color-scheme: dark)').matches incase colorScheme === auto we need to see what the system uses
4040
4141 const icon = L . icon ( {
4242 iconUrl : train . TrainData . ControlledBySteamID && avatar ? avatar : botIcon ,
You can’t perform that action at this time.
0 commit comments