Skip to content

Sample State

Snigdha Banda edited this page Oct 28, 2021 · 24 revisions
    {
    entities: {
         users: {
             3: {
                 id: 3,
                 email: user3@gmail.com,
                 authorDisplayName: Rob Smith,
                 authorDisplayIcon: /assets/8239#2848#
                },
            25: {
                 id: 25,
                 email: user25@gmail.com,
                 authorDisplayName: Patti Marquez,
                 authorDisplayIcon: /assets/93081838428,
                }
              },
         channels: {
            1: {
                 id: 1,
                 name: "general",
                 topic: "all discussions here",
                 description: "for entire workspace"
                },
             2: {
                  id: 2,
                  name: "random",
                  topic: null,
                  description: "miscellaneous"
                }
               },
         dms: {
                1: {
                    id: 1,
                    messages: [7, 8, 9]
                 },
                2: {
                    id: 2,
                    messages: [10, 11, 12]
                 }
              },
         reacts: {
             12: {
                 id: 12,
                 image_url: 5,
                 reactor_id: 10
                },
             20: {
                 id: 20,
                 image_url: 6,
                 reactor_id: 20
                }
            },
          messages: {
             1: {
                id: 1,
                body: "what are you doing?",
                parent_message: null,
                reacts: [12, 20, 1]
               },
            2: {
                id: 2,
                body: "i am responding!",
                parent_message: [1],
                reacts: [10, 9]
               }
            }
        }
    ui: {
        launchingWorkspace: true/false, 
        sidebar: {
            channelMessageNotif: true/false,
            dMessageNotif: true/false,
            addChannel: true/false,
            addDM: true/false
            },
        messageBox: {
            attachment: true/false,
            react: picture,
            mention: true/false 
            },
        scroll: {
            bottomOfPage: true/false
            }
        },
    errors: {
         signup: ["Incorrect email/password combination"],
         login: ["Incorrect email/password combination"],
         channelName: ["Already taken"],
        },
    session: { currentUserId: 3 }
    }

Clone this wiki locally