From 0067033edb7189cdd43e323944815655de595950 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Tue, 18 Apr 2023 19:27:47 +0200 Subject: [PATCH] Created the AccountContext.jsx --- .../contexts/Account/AccountContext.jsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/common/contexts/Account/AccountContext.jsx diff --git a/src/common/contexts/Account/AccountContext.jsx b/src/common/contexts/Account/AccountContext.jsx new file mode 100644 index 0000000..b3f77c6 --- /dev/null +++ b/src/common/contexts/Account/AccountContext.jsx @@ -0,0 +1,24 @@ +import {createContext, useEffect, useState} from "react"; + + +export const AccountContext = createContext({}); + +export const AccountProvider = ({children}) => { + + const [sessionToken, setSessionToken] = useState(localStorage.getItem("sessionToken") || null); + const [user, setUser] = useState(null); + + const updateInformation = () => { + + } + + useEffect(() => { + updateInformation(); + }, []); + + return ( + + {children} + + ) +} \ No newline at end of file