-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
DavidWoolner edited this page Sep 3, 2021
·
5 revisions
{
entities: {
users: {
1: {
id: 1,
email: "WikiWikiJack@gmail.com",
firstName: "Jack",
lastName: "Lantern",
birthdate: 1981-31-10,
bio: "I love to travel, and taste pumpkin pies from around the world!",
},
6: {
id: 6,
email: "LindaYorba@gmail.com",
firstName: "Linda",
lastName: "Yorbanowitz",
birthdate: 1999-09-01,
bio: "Hi! I'm Linda. Nothing thrills me more than staying in incredible homes from different eras!",
},
123: {
id: 123,
email: "BObama@gmail.com",
firstName: "Barry",
lastName: "Obama",
birthdate: 1956-03-22,
bio: "", // bio can be left blank
},
},
listings: {
1: {
id: 1,
title: "Breathtaking Views with Roaring 20s Vibes!",
description: "A palatial townhouse with views of the downtown area, minutes to transit.",
eraTheme: "Roaring 20s",
address: "12 Bucklemyshoe Lane, Los Angeles, CA 90027",
photoUrls: activeStoragePath/exteriorImg1.png,
longitude: 118.2437,
latitude: 34.0522,
numBedrms: 3,
numBaths: 2,
price: 350,
},
90: {
id: 90,
title: "A Gothic Vampire Grotto",
description: "Prepare to be blown away by this velour dreamscape",
eraTheme: "Fantasy Vampire",
address: "101 Elm St, Newhall, CA 99027",
photoUrls: activeStoragePath/grottoImg.png,
longitude: 120.2700,
latitude: 34.0222,
numBedrms: 8,
numBaths: 4,
price: 835,
},
111: {
id: 111,
title: "Surfin' USA Beachhome",
description: "Beachboy vibes at this beachfront surf hang",
eraTheme: "50s Surf",
address: "8 Ocean Ave, Hermosa Beach, CA 90523",
photoUrls: activeStoragePath/beachHouse.png,
longitude: 116.2437,
latitude: 35.0562,
numBedrms: 2,
numBaths: 2,
price: 150,
},
},
bookings: {
1: {
id: 1,
listingId: 10,
bookerId: 12,
checkIn: 2021-11-31,
checkOut: 2021-12-12,
guests: 3,
totalPrice: 1492.36,
},
33: {
id: 33,
listingId: 60,
bookerId: 16,
checkIn: 2022-01-01,
checkOut: 2022-01-10,
guests: 1,
totalPrice: 1092.36,
},
39: {
id: 39,
listingId: 11,
bookerId: 21,
checkIn: 2022-02-31,
checkOut: 2022-03-15,
guests: 5,
totalPrice: 2492.36,
},
},
reviews: {
3: {
id: 3,
listingId: 20,
date: 2022-02-03,
authorId: 2,
body: "Had an amazing time in this 80s pop art extravanganza!",
rating: 5,
},
10: {
id: 10,
listingId: 90,
authorId: 12,
date: 2022-04-10,
body: "Not really into the vampire theme thing",
rating: 2,
},
},
},
ui: {
modal: ["login"],
modal: ["era suggestion"],
},
errors: {
login: ["Whoops! Something went wrong. Please re-enter your name and password."],
email: ["Sorry, that email has already been taken. Please enter a different email."],
booking: ["Sorry, the dates you have selected are not available for this listing"]
},
session: {
currentUserId: 39
currentBookings: [39, 10] // we show the current bookings to the current user
}
}