Skip to content

Sample State

Madeline Wilson edited this page Oct 31, 2021 · 15 revisions
{             
   entities: {.   
      users: {.   
        1: {.   
          id: 1,     
          email: 'placeholder@email.com',    
          username: 'Bowery Electric',
          name: 'Bowery Electric', 
          location: New York, New York,
          about: '',
          img_url: 'https://f4.bcbits.com/img/0008364587_21.jpg',
          artist: true,
          artist_id: 1               
       },
        2: { 
          id: 2, 
          email: 'moodln@email.com',
          username: 'moodln',
          name: 'maddie', 
          location: 'New York, New York',
          about: '',
          img_url: '',
          artist: false,
          artist_id: ''  
        },
        3: { 
          id: 3, 
          email: 'testing@email.com',
          username: 'Cindy Lee',
          name: 'Cindy Lee', 
          location: Toronto, Ontario,
          about: '',
          img_url: 'https://f4.bcbits.com/img/0012259842_21.jpg',
          artist: true,
          artist_id: 2 
        },
      },
      albums: {
        1: { 
          id: 1, 
          title: 'Beat', 
          artistId: 1,
        },
        2: {
          id: 2, 
          title: 'Act of Tenderness', 
          artistId: 2, 
        }
      }, 
      songs: {
        1: { 
          id: 1, 
          title: 'Act of Tenderness', 
          order: 1,
          albumId: 2,
        },
        2: {
          id: 2, 
          title: 'Empty Words',
          order: 2, 
          albumId: 1 
        }
      }, 
      genres: {
        1: { 
          id: 1, 
          name: 'rock'
        },
        2: {
          id: 2, 
          title: 'ambient'
        }
      },
      genreJoins: {
        1: { 
          id: 1, 
          albumId: 1, 
          genreId: 2,
          userId: 2
        },
        2: {
          id: 2, 
          albumId: 2, 
          genreId: 1,
          userId: 2
        }
      }, 
   ui: {
      loading: true/false, 
      modal: true/false
      }, 
   errors: {
      login: ['Incorrect username/password combination!'],
      songForm: ['Title cannot be blank'],
      }, 
   session: { currentUserId: 25 }

}

Clone this wiki locally