mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-28 20:59:23 -06:00
Shifted mode ternary to a variable
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const initialMode = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? "dark" : "light";
|
||||
|
||||
// Initial state for UI settings.
|
||||
// Add more settings as needed (e.g., theme preferences, user settings)
|
||||
const initialState = {
|
||||
@@ -15,7 +17,7 @@ const initialState = {
|
||||
sidebar: {
|
||||
collapsed: false,
|
||||
},
|
||||
mode: window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches? "dark": "light",
|
||||
mode: initialMode,
|
||||
greeting: { index: 0, lastUpdate: null },
|
||||
timezone: "America/Toronto",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user