Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | import { Auth0Provider } from "@auth0/auth0-react";
import { RouteComponents } from "./router/index";
import { Provider } from "react-redux";
import { Store } from "./store/Store";
import { SnackbarProvider } from "notistack";
import AuthSessionProvider from "@/authentication/AuthSessionProvider";
import { NOTISTACK_SNACKBAR_TEST_ID } from "@/utils/helpers/notistackTestIds";
import BackendConnectionBanner from "@/utils/components/backend-connection/BackendConnectionBanner";
const App = () => {
return (
<Auth0Provider
domain={import.meta.env.VITE_AUTH0_DOMAIN}
clientId={import.meta.env.VITE_AUTH0_CLIENT_ID}
authorizationParams={{
redirect_uri: `${window.location.origin}/`,
audience: import.meta.env.VITE_AUTH0_AUDIENCE,
scope: "openid profile email",
}}
cacheLocation="memory"
useRefreshTokens={true}
>
<Provider store={Store}>
<SnackbarProvider
autoHideDuration={3000}
anchorOrigin={{
vertical: "bottom",
horizontal: "right",
}}
maxSnack={3}
SnackbarProps={{
"data-testid": NOTISTACK_SNACKBAR_TEST_ID,
}}
// notistack v3 MaterialDesignContent renders message text inside <div id="notistack-snackbar"> (duplicate ids if stacked);
// use non-empty string messages (e.g. school registration "Successfully Created") so automation sees inner_text.
// Toast roots are queryable via data-testid={NOTISTACK_SNACKBAR_TEST_ID} (see notistackTestIds.js).
>
<AuthSessionProvider>
<RouteComponents />
<BackendConnectionBanner />
</AuthSessionProvider>
</SnackbarProvider>
</Provider>
</Auth0Provider>
);
};
export default App;
|