Skip to content

Commit

Permalink
chore: disable light mode (#3278)
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Oct 26, 2023
1 parent 39e615a commit 6f959c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions apps/cowswap-frontend/src/legacy/state/user/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useWalletInfo } from '@cowprotocol/wallet'
import { Currency, Percent, Token } from '@uniswap/sdk-core'

import JSBI from 'jsbi'
import { shallowEqual } from 'react-redux'

import {
addSerializedToken,
Expand Down Expand Up @@ -38,15 +37,16 @@ export function deserializeToken(serializedToken: SerializedToken): Token {
}

export function useIsDarkMode(): boolean {
const { userDarkMode, matchesDarkMode } = useAppSelector(
({ user: { matchesDarkMode, userDarkMode } }) => ({
userDarkMode,
matchesDarkMode,
}),
shallowEqual
)

return userDarkMode === null ? matchesDarkMode : userDarkMode
return true
// const { userDarkMode, matchesDarkMode } = useAppSelector(
// ({ user: { matchesDarkMode, userDarkMode } }) => ({
// userDarkMode,
// matchesDarkMode,
// }),
// shallowEqual
// )

// return userDarkMode === null ? matchesDarkMode : userDarkMode
}

export function useDarkModeManager(): [boolean, () => void] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const MAIN_MENU: MenuTreeItem[] = [
{
sectionTitle: 'Other',
links: [
{ kind: MenuItemKind.DARK_MODE_BUTTON },
// { kind: MenuItemKind.DARK_MODE_BUTTON },
{ id: MainMenuItemId.OTHER_COW_RUNNER, title: 'CoW Runner', url: Routes.PLAY_COWRUNNER, icon: IMAGE_GAME },
{ id: MainMenuItemId.OTHER_MEV_SLICER, title: 'MEV Slicer', url: Routes.PLAY_MEVSLICER, icon: IMAGE_SLICER },
{
Expand Down

0 comments on commit 6f959c6

Please sign in to comment.