This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Unfortunately I didn't find a way to add it directly to createInertiaApp so | |
* currently I'm placing it in my BaseLayout which is called on any route anyway | |
*/ | |
import React from 'react'; | |
import { ModalProvider } from '../components/momentum-modal/ModalContext'; | |
const BaseLayout: React.FC = ({ children }) => { | |
/* Wrap your children with the provider */ | |
return <ModalProvider resolve={(name) => import(`../pages/${name}`)}>{children}</ModalProvider>; |