Skip to content

Commit

Permalink
fix(): Make dark mode default.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Dec 20, 2023
1 parent 5a58bf2 commit bfadd98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/darkMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const isDark = (mode: Mode): boolean => {

const getTheme = () => {
const localMode = localStorage.getItem(mode_storage_key);
// Default to dark mode if none specified.
const resolvedMode =
localMode !== null && isMode(localMode) ? localMode : ("system" as const);
localMode !== null && isMode(localMode) ? localMode : ("dark" as const);
return {
mode: resolvedMode,
isDark: isDark(resolvedMode),
Expand Down

0 comments on commit bfadd98

Please sign in to comment.