Skip to content

Commit

Permalink
Add environment provider container to app (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatemart authored Feb 3, 2023
1 parent 09e8c80 commit ff8ecca
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import CirrusFavicon from './components/common/CirrusFavicon';
import { CssBaseline } from '@mui/material';
import { useRecoilValue } from 'recoil';
import * as Sentry from '@sentry/react';
import { RelayEnvironmentProvider } from 'react-relay';
import environment from '../src/createRelayEnvironment';

declare module '@mui/styles/defaultTheme' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
Expand All @@ -19,14 +21,16 @@ export default function App(): JSX.Element {
const theme = React.useMemo(() => createTheme(themeOptions), [themeOptions]);

return (
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
<CirrusFavicon />
<CssBaseline />
<Sentry.ErrorBoundary>
<Routes />
</Sentry.ErrorBoundary>
</ThemeProvider>
</StyledEngineProvider>
<RelayEnvironmentProvider environment={environment}>
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
<CirrusFavicon />
<CssBaseline />
<Sentry.ErrorBoundary>
<Routes />
</Sentry.ErrorBoundary>
</ThemeProvider>
</StyledEngineProvider>
</RelayEnvironmentProvider>
);
}

0 comments on commit ff8ecca

Please sign in to comment.