1
0
Fork 0
freesewing/sites/shared/components/wrappers/context.mjs
Joost De Cock e47c18177b wip(shared): Removed useApp hook in favor of contexts
This removes the useApp hook from all org pages in favor of various
context. This means there is no longer global state that gets passed
around, instead each component that requires access to something shared
(like account, or navigation) can just use the context instead.

This is a first step, as a lot of shared components stil rely on app not
to mention the dev and lab sites.
2023-04-28 21:23:06 +02:00

11 lines
465 B
JavaScript

import { ModalContextProvider } from 'shared/context/modal-context.mjs'
import { LoadingContextProvider } from 'shared/context/loading-context.mjs'
import { NavigationContextProvider } from 'shared/context/navigation-context.mjs'
export const ContextWrapper = ({ children }) => (
<ModalContextProvider>
<LoadingContextProvider>
<NavigationContextProvider>{children}</NavigationContextProvider>
</LoadingContextProvider>
</ModalContextProvider>
)