import { createContext, type FunctionComponent, type ReactNode, useContext } from 'react'; import { type AppLayout, useAppLayoutValue } from './useAppLayoutValue'; const AppLayoutContext = createContext(null); export const useAppLayout = () => { const context = useContext(AppLayoutContext); if (context === null) { throw new Error('useAppLayout must be used within an '); } return context; }; interface Props { children: ReactNode; } export const AppLayoutProvider: FunctionComponent = ({ children }) => { const appLayout = useAppLayoutValue(); return {children}; };