Files
papercrate/frontend/src/appShellContext.js
T
2025-10-19 21:23:35 +02:00

13 lines
312 B
JavaScript

import React from 'react';
export const AppShellContext = React.createContext(null);
export const useAppShell = () => {
const context = React.useContext(AppShellContext);
if (!context) {
throw new Error('AppShellContext not found. Ensure routes are nested under AppLayout.');
}
return context;
};