Got for loops and action references working

This commit is contained in:
frikky
2020-05-21 09:32:24 +02:00
parent 8463404c95
commit 793975222a
6 changed files with 67 additions and 60 deletions
+2
View File
@@ -92,11 +92,13 @@ const App = (message, props) => {
})
.then(response => response.json())
.then(responseJson => {
console.log(responseJson)
if (responseJson.success === true) {
setUserData(responseJson)
setIsLoggedIn(true)
// Updating cookie every request
console.log("COOKIES: ", cookies)
for (var key in responseJson["cookies"]) {
setCookie(responseJson["cookies"][key].key, responseJson["cookies"][key].value, {path: "/"})
}