-
Notifications
You must be signed in to change notification settings - Fork 2
Sample State
Deborah Wei edited this page Aug 20, 2022
·
11 revisions
{
entities {
users: {
1: {
id: 1,
name: Demo User
username: "demo",
pins: [1],
savedPins: [3]
boards: [1],
followers: [2],
followings: [2]
},
2: {
id: 2,
username: "debbidodah",
name: Deborah Wei
pins: [2],
savedPins: [1]
boards: [2],
followers: [1]
followings: [1]
},
pins: {
1: {
id: 1,
title: "European summer",
description: "Laugh live love,
userId: 1,
boardId: 1,
url: ""
},
2: {
id: 2,
title: "This ivy house",
description: "Leaves for days",
userId: 2,
boardId: 2,
url: ""
},
boards: {
1: {
id: 1,
name: "Travel inspo",
description: "A journey is a heart's map",
public: true,
userId: 1,
pinsId: [1],
comments: [1]
},
2: {
id: 2,
name: "House inspo",
description: "Live where you love",
public: true,
userId: 2,
pinsId: [2],
comments: [2]
}
},
comments: {
1: {
id: 1
text: "where is this from?",
pin_id: 1,
user_id: 1
},
2: {
id: 2
text: "omg so pretty",
pin_id: 2,
user_id: 2
},
}
},
ui: {
loading: true/false,
modalOpen: true/false
},
errors: {
userErrors: ["Username or Password can't be blank"],
sessionErrors: ["Invalid Username or Password Combination"],
pinErrors: ["Title can't be blank"],
},
session: { currentUserId: 1 }
}