Fix/872: Remove useThemeSwitcher from Token as it's redundant and was stripping dark class (#886)

This commit is contained in:
Sam Keen 2022-07-27 15:30:29 +01:00 committed by GitHub
parent 363562e330
commit e3dd73531c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -49,7 +49,7 @@ const AppContainer = () => {
<AppLoader>
<BalanceManager>
<>
<div className="app dark max-w-[1300px] mx-auto my-0 grid grid-rows-[min-content_1fr_min-content] min-h-full lg:border-l-1 lg:border-r-1 lg:border-white font-sans text-body lg:text-body-large text-white-80">
<div className="app max-w-[1300px] mx-auto my-0 grid grid-rows-[min-content_1fr_min-content] min-h-full lg:border-l-1 lg:border-r-1 lg:border-white font-sans text-body lg:text-body-large text-white-80">
<AppBanner />
<TemplateSidebar sidebar={sideBar}>
<AppRouter />

View File

@ -2,7 +2,6 @@ import React from 'react';
import { usePrevious } from './use-previous';
import type { BigNumber } from '../lib/bignumber';
import { theme as tailwindcss } from '@vegaprotocol/tailwindcss-config';
import { useThemeSwitcher } from '@vegaprotocol/react-helpers';
const Colors = tailwindcss.colors;
const FLASH_DURATION = 1200; // Duration of flash animation in milliseconds
@ -13,7 +12,6 @@ export function useAnimateValue(
) {
const shouldAnimate = React.useRef(false);
const previous = usePrevious(value);
const [theme] = useThemeSwitcher();
React.useEffect(() => {
const timeout = setTimeout(() => {
@ -38,8 +36,7 @@ export function useAnimateValue(
offset: 0.8,
},
{
backgroundColor:
theme === 'dark' ? Colors.white[60] : Colors.black[60],
backgroundColor: Colors.white[60],
color: Colors.white.DEFAULT,
},
],
@ -64,8 +61,7 @@ export function useAnimateValue(
offset: 0.8,
},
{
backgroundColor:
theme === 'dark' ? Colors.white[60] : Colors.black[60],
backgroundColor: Colors.white[60],
color: Colors.white.DEFAULT,
},
],