-
Notifications
You must be signed in to change notification settings - Fork 3
Sample State
ebaek edited this page Aug 1, 2019
·
7 revisions
{
entities: {
users: {
12: {
id: 12,
username: "robinhood88",
first_name: "Rob",
last_name: "Hood",
email: "robhood@gmail.com",
watched_company_ids: [11, 83, 90],
portfolio_value: 3456.52,
},
37: {
id: 37,
username: "batman34",
first_name: "Bob",
last_name: "Kim",
email: "bobkim465@gmail.com",
watched_company_ids: [3, 13, 100, 188],
portfolio_value: 32.13,
},
10: {
id: 10,
username: "wolfofwallst12",
first_name: "Matt",
last_name: "Damon",
email: "financeguy333@yahoo.com",
watched_company_ids: [2, 4],
portfolio_value: 50003.30,
},
},
companies: {
"SNAP": {
id: 11,
ticker: "SNAP",
},
"TSLA": {
id: 343,
ticker: "TSLA",
},
},
transactions: {
12: {
id: 12,
user_id: 33,
companyId: 11,
date: "05-15-12",
purchase_price: 33.15,
buy: true,
},
14: {
id: 14,
user_id: 12,
companyId: 15,
date: "02-5-18",
purchase_price: 88.35,
buy: false,
},
17: {
id: 17,
user_id: 10,
companyId: 343,
date: "07-15-19",
purchase_price: 20.23,
buy: true,
},
},
},
ui: {
loading: true/false
},
errors: {
login: [
"Incorrect username/password combination"
],
transactionForm: [
"Insufficient amount of money"
],
},
session: { currentUserId: 10
}
}