This commit is contained in:
2024-09-24 15:46:05 +05:30
parent d1a01b60fe
commit 4482aad236
11 changed files with 704 additions and 15 deletions

View File

@@ -0,0 +1,6 @@
// GlobalStateContext.js
import { createContext } from 'react';
const GlobalStateContext = createContext();
export default GlobalStateContext;

View File

@@ -0,0 +1,20 @@
// GlobalStateContext.js
import React, { useState } from "react";
import GlobalStateContext from "./GlobalStateContext";
const GlobalStateProvider = ({ children }) => {
const [isAuthenticate, setIsAuthenticate] = useState(false);
return (
<GlobalStateContext.Provider
value={{
isAuthenticate,
setIsAuthenticate,
}}
>
{children}
</GlobalStateContext.Provider>
);
};
export default GlobalStateProvider;