Skip to content

Commit

Permalink
initial ory route (#4612)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town authored May 8, 2024
1 parent 22e8466 commit b85ae47
Show file tree
Hide file tree
Showing 12 changed files with 831 additions and 14,510 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
26 changes: 16 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,27 @@ 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 MainWrapper: React.FC<PropsType> = ({ history, location }) => {
return (
<ContextProvider history={history} location={location}>
<AuthzProvider>
<AuthnProvider>
<MainWrapperErrorBoundary>
<Main />
</MainWrapperErrorBoundary>
</AuthnProvider>
</AuthzProvider>
<ThemeProvider 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 b85ae47

Please sign in to comment.