Fix SSE route dependency and align architecture docs
This commit is contained in:
11
frontend/src/contexts/useApp.ts
Normal file
11
frontend/src/contexts/useApp.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useContext } from 'react';
|
||||
|
||||
import { AppContext, type AppContextValue } from './app-context';
|
||||
|
||||
export function useApp(): AppContextValue {
|
||||
const context = useContext(AppContext);
|
||||
if (!context) {
|
||||
throw new Error('useApp must be used within an AppProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user