Skip to content

Commit

Permalink
fix: chart registering
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Sep 25, 2023
1 parent 188f997 commit 1fa3dc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
16 changes: 0 additions & 16 deletions apps/oeth/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
import { Container, CssBaseline, Stack } from '@mui/material';
import {
CategoryScale,
Chart as ChartJS,
LinearScale,
LineElement,
PointElement,
registerables,
} from 'chart.js';
import { Outlet } from 'react-router-dom';

import { Topnav } from './components/Topnav';

ChartJS.register(
...registerables,
CategoryScale,
LinearScale,
LineElement,
PointElement,
);

export const App = () => {
return (
<>
Expand Down
8 changes: 7 additions & 1 deletion apps/oeth/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import * as ReactDOM from 'react-dom/client';

import { Experimental_CssVarsProvider as CssVarsProvider } from '@mui/material';
import { chains, queryClient, wagmiConfig } from '@origin/oeth/shared';
import { CurveProvider, NotificationsProvider } from '@origin/shared/providers';
import {
CurveProvider,
NotificationsProvider,
registerChart,
} from '@origin/shared/providers';
import { theme } from '@origin/shared/theme';
import { composeContexts } from '@origin/shared/utils';
import { darkTheme, RainbowKitProvider } from '@rainbow-me/rainbowkit';
Expand All @@ -22,6 +26,8 @@ import { routes } from './routes';
// https://github.com/dai-shi/proxy-compare/pull/8
setAutoFreeze(false);

registerChart();

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
);
Expand Down

0 comments on commit 1fa3dc9

Please sign in to comment.