diff --git a/apps/tokenomics/context/ConfigProvider.jsx b/apps/tokenomics/context/ConfigProvider.jsx deleted file mode 100644 index 85edc9a4..00000000 --- a/apps/tokenomics/context/ConfigProvider.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import { ConfigProvider as AntdConfigProvider } from 'antd'; -import { useEffect, useState } from 'react'; - -import { THEME_CONFIG } from '@autonolas/frontend-library'; - -export const ThemeConfigProvider = ({ children }) => { - const [isMounted, setIsMounted] = useState(false); - - useEffect(() => { - setIsMounted(true); - }, []); - - return ( - - {isMounted ? children : ''} - - ); -}; diff --git a/apps/tokenomics/pages/_app.jsx b/apps/tokenomics/pages/_app.jsx index 9f142822..85753ccb 100644 --- a/apps/tokenomics/pages/_app.jsx +++ b/apps/tokenomics/pages/_app.jsx @@ -3,12 +3,13 @@ import { useRouter } from 'next/router'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; +import { AutonolasThemeProvider } from 'libs/ui-theme/src'; + import GlobalStyle from 'components/GlobalStyles'; /** antd theme config */ import Layout from 'components/Layout'; -import { ThemeConfigProvider } from '../context/ConfigProvider'; import Web3ModalProvider from '../context/Web3ModalProvider'; import { store } from '../store'; @@ -24,7 +25,7 @@ const MyApp = ({ Component, pageProps }) => { - + {isNotLegal ? ( ) : ( @@ -34,7 +35,7 @@ const MyApp = ({ Component, pageProps }) => { )} - + ); diff --git a/libs/ui-theme/src/lib/ThemeConfig.tsx b/libs/ui-theme/src/lib/ThemeConfig.tsx index 20af8aeb..22a53580 100644 --- a/libs/ui-theme/src/lib/ThemeConfig.tsx +++ b/libs/ui-theme/src/lib/ThemeConfig.tsx @@ -1,8 +1,11 @@ import { ConfigProvider as AntdConfigProvider, ConfigProviderProps, ThemeConfig } from 'antd'; import { useEffect, useState } from 'react'; + + import { COLOR } from './ui-theme'; + export const THEME_CONFIG: ThemeConfig = { token: { wireframe: false, @@ -85,4 +88,4 @@ export const AutonolasThemeProvider = ({ theme = THEME_CONFIG, children }: Confi }, []); return {isMounted ? children : ''}; -}; +}; \ No newline at end of file