move to Donetick Org, First commit frontend
This commit is contained in:
commit
2657469964
105 changed files with 21572 additions and 0 deletions
18
src/service/AuthenticationService.jsx
Normal file
18
src/service/AuthenticationService.jsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import React, { createContext, useState } from 'react'
|
||||
|
||||
const AuthenticationContext = createContext({})
|
||||
|
||||
const AuthenticationProvider = ({ children }) => {
|
||||
const [isLoggedIn, setIsLoggedIn] = useState(false)
|
||||
const [userProfile, setUserProfile] = useState({})
|
||||
return (
|
||||
<AuthenticationContext.Provider
|
||||
value={{ isLoggedIn, setIsLoggedIn, userProfile, setUserProfile }}
|
||||
>
|
||||
{children}
|
||||
</AuthenticationContext.Provider>
|
||||
)
|
||||
}
|
||||
export { AuthenticationContext, AuthenticationProvider }
|
||||
|
||||
// export default AuthenticationProvider;
|
Loading…
Add table
Add a link
Reference in a new issue