-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Jamie An edited this page Nov 29, 2021
·
8 revisions
{
entities: {
users: {
1: {
id: 1,
username: "Abe_the_Babe",
},
2: {
id: 2,
username: "Bike_Badsen",
}
},
posts: {
1: {
id: 1,
title: "Does your dog stare at you?",
body: "My dog sits in the corner of the room and stares at me for hours... Is this normal???",
poster_id: 1,
community_id: 1
},
2: {
id: 2,
title: "My cat's a mess, Watch!",
media: "https://some.catvideo.com/video/crazy_cat.mp4",
poster_id: 1,
community_id: 1
},
3: {
id: 3,
title: "My pet turtle is sick!",
body: "My turtle, Mr. Shellington, isn't feeling too well! Is this a good guide to follow to make him feel better?",
link: "https://www.turtleHealing.org/guide/",
poster_id: 1,
community_id: 1
},
4: {
id: 4,
title: "Just Want to say Hello! New member here!",
poster_id: 2,
community_id: 1
}
},
comments: {
1: {
id: 1,
comment: "Yeah my dog does that all the time too!",
commenter_id: 2,
post_id: 1
},
2: {
id: 2,
comment: "Okay cool!, I was a little worried.",
commenter_id: 1,
post_id: 1,
parent_comment_id: 1
},
3: {
id: 3,
comment: "I wouldn't worry about it.",
commenter_id: 2,
post_id: 1,
parent_comment_id: 2
}
},
votes: {
1: {
id: 1,
vote: true,
user_id: 1,
parent_type: "comments",
parent_id: 1
}
},
saves: {
1: {
id: 1,
user_id: 2,
parent_type: "posts",
parent_id: 1
},
2: {
id: 2,
user_id: 1,
parent_type: "comments",
parent_id: 3
}
},
follows: {
1: {
id: 1,
user_id: 1,
community_id: 1
},
2: {
id: 2,
user_id: 2,
community_id: 1
}
},
communities: {
"DerpyAnimals": {
id: 1,
sub: "DerpyAnimals",
about: "Anything and everything about derpy animals!",
icon: "https://some.derpydogpic.com/picture.jpg",
banner: "https://wide.dog.com/banner.jpg",
creator_id: 1,
follower_count: 2,
followed_by_current_user: true,
cake_date: "Nov 28, 2021"
}
}
},
ui: {
modal: 'login'
},
errors: {
session: ["Incorrect username/password combination"],
postForm: ["Post title cannot be blank"],
commentForm: ["Comment content cannot be blank"],
communityForm: ["Community sub and about cannot be blank"],
},
session: { currentUserId: 2 }
}