import React, { useContext } from 'react'
import {
LoadingStatusContext,
LoadingStatusContextProvider,
} from '@freesewing/react/context/LoadingStatus'
import { ModalContext, ModalContextProvider } from '@freesewing/react/context/Modal'
import { Layout as DefaultLayout } from '@freesewing/react/components/Layout'
/*
* This component should be the top level of a Docusaurus page
*
* This sets up the various context providers before
* passing all props down to the InnerPageWrapper.
* This is required because the context providers need to
* be setup for the modal and loading state work we do in the InnerPageWrapper
*
* We also re-use the Docusaurus Layout component here, which needs to be at
* the top level of the page
*/
export const DocusaurusPage = (props) => {
const DocusaurusLayout = props.DocusaurusLayout
return DocusaurusLayout ? (
You need to pass in the DocusaurusLayout component
) } /* * This component should be the top level of a Docusaurus doc (mdx) * where you want access to context (typically account pages and so on) * * This sets up the various context providers before * passing all props down to the InnerPageWrapper. * This is required because the context providers need to * be setup for the modal and loading state work we do in the InnerPageWrapper */ export const DocusaurusDoc = (props) => (