Files
SSA-Admin-Panel/src/Contexts/GlobalStateContext.tsx
2025-02-12 16:27:49 +05:30

15 lines
522 B
TypeScript

// GlobalStateContext.ts
import { createContext, Dispatch, SetStateAction } from 'react';
// Define the shape of your context value
export interface GlobalStateContextType {
isAuthenticate: boolean;
setIsAuthenticate: Dispatch<SetStateAction<boolean>>;
isBarLoading: boolean;
setIsBarLoading: Dispatch<SetStateAction<boolean>>;
}
// Create the context with a default value of `undefined`
const GlobalStateContext = createContext<GlobalStateContextType | undefined>(undefined);
export default GlobalStateContext;