Skip to content

Commit

Permalink
feat: Remove ui.darkmode.enabled flag condition
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Sep 23, 2024
1 parent e2241f6 commit 67e67cd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions react/providers/CozyTheme/DumbCozyTheme.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'

import flag from 'cozy-flags'

import { CozyThemeContext } from './index'
import MuiCozyTheme from '../../MuiCozyTheme'
import useMediaQuery from '../../hooks/useMediaQuery'
Expand All @@ -18,11 +16,8 @@ const DumbCozyTheme = ({
const uiThemeType = localStorage.getItem('ui-theme-type') // use only for cozy-ui documentation and argos screenshots
const uiThemeVariant = localStorage.getItem('ui-theme-variant') // use only for cozy-ui documentation and argos screenshots

const isOnlyLight = !!flag('ui.darkmode.enabled') // should be remove when dark mode is validated on all apps
const deviceThemeType = useMediaQuery('(prefers-color-scheme: dark)')
? isOnlyLight
? 'dark'
: 'light'
? 'dark'
: 'light'
const filteredSettingsThemeType = ['light', 'dark'].includes(
settingsThemeType
Expand Down

0 comments on commit 67e67cd

Please sign in to comment.