Skip to content

Commit

Permalink
Merge branch 'master' of github.com:porter-dev/porter into neon-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen committed May 8, 2024
2 parents e5ddbaa + 1f79481 commit 5c09d8a
Show file tree
Hide file tree
Showing 14 changed files with 852 additions and 14,511 deletions.
14,261 changes: 75 additions & 14,186 deletions dashboard/package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"@loadable/component": "^5.15.2",
"@material-ui/core": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@ory/client": "^1.9.0",
"@ory/elements": "^0.2.0",
"@react-spring/web": "^9.6.1",
"@sentry/react": "^6.13.2",
"@sentry/tracing": "^6.13.2",
Expand Down
31 changes: 21 additions & 10 deletions dashboard/src/main/MainWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import { IntlProvider, ThemeProvider } from "@ory/elements";
import { withRouter, type RouteComponentProps } from "react-router";

import AuthzProvider from "shared/auth/AuthzContext";
Expand All @@ -7,22 +8,32 @@ import MainWrapperErrorBoundary from "shared/error_handling/MainWrapperErrorBoun
import AuthnProvider from "../shared/auth/AuthnContext";
import { ContextProvider } from "../shared/Context";
import Main from "./Main";
import CurrentError from "./CurrentError";
// required styles for Ory Elements
import "@ory/elements/dist/style.css";

type PropsType = RouteComponentProps & {};
type PropsType = RouteComponentProps;

const themeOverrides = {
fontFamily: '"Work Sans", sans-serif',
// other theme properties...
};

const MainWrapper: React.FC<PropsType> = ({ history, location }) => {
return (
<ContextProvider history={history} location={location}>
<AuthzProvider>
<AuthnProvider>
<MainWrapperErrorBoundary>
<Main />
</MainWrapperErrorBoundary>
</AuthnProvider>
</AuthzProvider>
<ThemeProvider themeOverrides={themeOverrides}>
<IntlProvider locale="en" defaultLocale="en">
<AuthzProvider>
<AuthnProvider>
<MainWrapperErrorBoundary>
<Main />
</MainWrapperErrorBoundary>
</AuthnProvider>
</AuthzProvider>
</IntlProvider>
</ThemeProvider>
</ContextProvider>
);
};

export default withRouter(MainWrapper);
export default withRouter(MainWrapper);
Loading

0 comments on commit 5c09d8a

Please sign in to comment.