This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2022-02-23 11:14:06 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import "@fontsource/sora/300.css"; // light
|
|
|
|
import "@fontsource/sora/400.css"; // normal
|
|
|
|
import "@fontsource/sora/500.css"; // medium
|
|
|
|
import "@fontsource/sora/600.css"; // semibold
|
|
|
|
import "@fontsource/source-sans-pro/400.css"; // normal
|
|
|
|
import "@fontsource/source-sans-pro/600.css"; // semibold
|
|
|
|
import "./src/styles/global.css";
|
2022-03-24 09:39:18 +00:00
|
|
|
import { MODAL_ROOT_ID } from "./src/components/Modal";
|
2022-03-29 13:57:55 +00:00
|
|
|
import { PortalSettingsProvider } from "./src/contexts/portal-settings";
|
2022-02-23 11:14:06 +00:00
|
|
|
|
|
|
|
export function wrapPageElement({ element, props }) {
|
|
|
|
const Layout = element.type.Layout ?? React.Fragment;
|
2022-03-24 09:39:18 +00:00
|
|
|
return (
|
2022-03-29 13:57:55 +00:00
|
|
|
<PortalSettingsProvider>
|
|
|
|
<Layout {...props}>
|
|
|
|
{element}
|
|
|
|
<div id={MODAL_ROOT_ID} />
|
|
|
|
</Layout>
|
|
|
|
</PortalSettingsProvider>
|
2022-03-24 09:39:18 +00:00
|
|
|
);
|
2022-02-23 11:14:06 +00:00
|
|
|
}
|