15 lines
522 B
TypeScript
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;
|