-
Notifications
You must be signed in to change notification settings - Fork 0
State Shape
Isaacc1998 edited this page Oct 7, 2022
·
4 revisions
{
entities: {
users: {
1: {
id: 1,
username: "Joe",
},
2: {
id: 2,
username: "Bob"
}
},
flashcards: {
1: {
id: 1,
front: "What is 1 + 1?",
back: "2",
set_id: 1,
}
2: {
id: 2,
front: "3 - 8 * 5",
back: "-37",
set_id: 1,
}
3: {
id: 3,
front: "Pythagorean Theorem Formula",
back: "a^2 + b^2 = c^2",
set_id: 1,
}
},
flashcard_sets: {
1: {
id: 1,
title: "Easy Maths",
author_id: 1,
}
},
questions: {
1: {
id: 1,
body: "Why is the sky blue?",
author_id: 1,
}
2: {
id: 2,
body: "Who is George Washington?",
author_id: 2,
}
},
answers: {
1: {
id: 1,
body: "I have no idea",
question_id: 1,
author_id: 2,
}
2: {
id: 2,
body: "The first president of the United States of America",
question_id: 2,
author_id: 1,
}
}
},
session: {
currentUserId: 1
},
ui: {
modal: true/false
},
errors: {
login: ["Incorrect password or username"],
flashcard: ["Flashcard text cannot be left blank"],
question: ["Question cannot be left blank"]
}
}