State Shape - xalcolm1/Table-Ouverte GitHub Wiki

{
  entities: {
    restuarants: {
      1: {
        id: 1,
        name: "nacho kitchen",
        cuisine: "mexican",
        address: "1212 13th Street, San Francisco CA",
        reviews: {
                   0: { 
                      review: {
                               id: 2,
                               overall: 5,
                               body: "best Tacos in the world for sure",
                               user_id: 25,
                               restuarant_id: 1
                       },
                      firstname: jose
                   },
                   1: {
                      review: {
                              id: 5,
                              overall: 0,
                              body: "no sauce",
                              user_id: 11,
                              restuarant_id: 1
                              },
                      firstname: jose
                      
                    }


        },
    
    },
    users: {
      11: {
        id: 11,
        firstname: "jose",
        lastname: "enrique",
        email: "[email protected]",  
           
      },
      25: {
        id: 25,
        firstname: "carlos",
        lastname: "lectorus",
        email: "[email protected]",
        imgUrl: "https://gph.is/st/m7zrbQY"
      }
    },
    
  },
  ui: {
    loading: true/false
  },
  errors: {
    login: ["Invalid Username or Password"],
    reviewForm: ["Review body cannot be empty", "Title cannot be empty"],
  },
  session: { currentUserId: 25 }
}