aboutsummaryrefslogblamecommitdiffstats
path: root/src/service/AuthenticationService.jsx
blob: 924de11806208154eb1098f3a3838e6448eb3c6e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;