fixes / register user

This commit is contained in:
2021-02-08 15:48:21 +01:00
parent f25196f57e
commit ab0f65e247
10 changed files with 310 additions and 72 deletions

View File

@@ -1,9 +1,6 @@
const initialState = {
showDishList: false,
loggedIn: false,
username: "",
userId: "",
userEmail: "",
userData: {
jwt: "",
firstname: "",
@@ -16,6 +13,7 @@ const initialState = {
companyName: "",
},
restaurants: [],
isRestaurant: false
},
dialogs: {
regulamin: false,
@@ -44,12 +42,14 @@ const data = (state = initialState, action) => {
lastname: action.payload.lastname,
userId: action.payload.userId,
userEmail: action.payload.email,
login: action.payload.login,
billing: {
NIP: action.payload.NIP,
adress: action.payload.adress,
companyName: action.payload.companyName,
},
restaurants: action.payload.restaurants,
isRestaurant: action.payload.isRestaurant
},
});
case "SET_LOGGEDOUT":
@@ -68,6 +68,7 @@ const data = (state = initialState, action) => {
companyName: "",
},
restaurants: [],
isRestaurant: false
},
});
case "DIALOG_REGULAMIN_SHOW":