Skip to content

Sample State

thedanielcho edited this page May 14, 2021 · 7 revisions
{
  entitities: {
    users: {
      15: {
        id: 15,
        displayName: "Fif Teen",
        avatarImg: "somepath/my_pic.jpeg",
        membershipId: 3
      },
      2: {
        id: 2,
        displayName: "Daniel Cho",
        avatarIimg: "somepath/me.png",
        membershipId: 5
      },
      26: {
        id: 26,
        displayName: "notmyrealname",
        avatarIimg: "somepath/coolanimeprofilepicofnartuo.jpeg",
        membershipId: 17
      }
    },
    channels: {
      4: {
        id:4,
        name: "#Go-for-it!",
        public: true,
        adminId: 2,
      },
      154: {
        id:154,
        name: "#general",
        public: true,
        admin_id: 15,
        description: "This is the general channel for general stuff", //When sidebar with description is open
        createdAt: "2021-5-14" //When sidebar with description is open
      }
    },
    messages: {
      1: {
        id: 1,
        userId: 2,
        messageableType: "channel",
        messageableId: 4,
        body: "Testing",
        createdAt: "2021-05-01T01:14:46.033Z",
        edited: false
      },
      2: {
        id: 2,
        userId: 2,
        messageableType: "channel",
        messageableId: 4,
        body: "testteasdf",
        createdAt: "2021-05-05T02:16:36.033Z",
        edited: true
      },
      66: {
        id: 66,
        userId: 66,
        messageableType: "direct_message",
        messageableId: 66,
        body: "Have you received Jesus Christ into your home?",
        createdAt: "2021-06-06T06:06:06.006Z",
        edited: false
      }
    },
    directMessages: {
      14: {
        id: 14,
      }
    },
    threads: {
      2: {
        id: 2,
        parentMessageId: 1,
        childMessageIds: [51,61,78,98]
      }
    }
  },
  ui: {
    loading: false,
    modal: "users" //Checking how the users in a channel
  },
  session: {
    currentUser: 2,
  },
  errors: {
    signup: ["The email you have entered has already been used, please sign in here", "Passwords must be at least 18 characters long with at least 4 special characters"],
    login: ["Incorrect credentials, please make sure everything is spelled correctly"],
    channelView: ["This channel is private"],
  }
}

Clone this wiki locally