Skip to content

Commit

Permalink
(tokenomics) style: move to shared theme config
Browse files Browse the repository at this point in the history
  • Loading branch information
Atatakai authored and Atatakai committed Jul 18, 2024
1 parent a301e51 commit 6bf3bfc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
18 changes: 0 additions & 18 deletions apps/tokenomics/context/ConfigProvider.jsx

This file was deleted.

7 changes: 4 additions & 3 deletions apps/tokenomics/pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -24,7 +25,7 @@ const MyApp = ({ Component, pageProps }) => {
</Head>
<GlobalStyle />
<Provider store={store}>
<ThemeConfigProvider>
<AutonolasThemeProvider>
{isNotLegal ? (
<Component {...pageProps} />
) : (
Expand All @@ -34,7 +35,7 @@ const MyApp = ({ Component, pageProps }) => {
</Layout>
</Web3ModalProvider>
)}
</ThemeConfigProvider>
</AutonolasThemeProvider>
</Provider>
</>
);
Expand Down
5 changes: 4 additions & 1 deletion libs/ui-theme/src/lib/ThemeConfig.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -85,4 +88,4 @@ export const AutonolasThemeProvider = ({ theme = THEME_CONFIG, children }: Confi
}, []);

return <AntdConfigProvider theme={theme}>{isMounted ? children : ''}</AntdConfigProvider>;
};
};

0 comments on commit 6bf3bfc

Please sign in to comment.