Skip to content

Sample State

Timothy Chang edited this page Feb 3, 2023 · 3 revisions
{ 
  entities: {
    users: {
      1: {
        id: 1, 
        username: "TimC1229",
        name: "Timothy Chang",
        likedSongs: [...], 
        likedPlaylists: [...],
        likedAlbums: [...],
      },
      2: {
        id: 2, 
        username: "TheGoat6",
        name: "Michael Jordan",
        likedSongs: [...], 
        likedPlaylists: [...],
        likedAlbums: [...],
      }
    },
    songs: {
      15: {
        id: 15, 
        title: "As It Was",
        artist_id: 12,
        album_id: 9
      },
      16: {
        id: 16, 
        title: "Superhero",
        artist_id: 16,
        album_id: 20
      }
    },
    playlists: {
      6: {
        id: 6, 
        title: "Happy Songs",
        author_id: 1,
        public: true,
        songs: [...],
        playlist_photo_url: (...)
      },
      7: {
        id: 7, 
        title: "Sad Songs",
        author_id: 2,
        public: false,
        songs: [...],
        playlist_photo_url: (...)
      }
    },
    artists: {
      12: {
        id: 12, 
        name: "Harry Styles",
        Description: "I was part of One Direction",
        albums: [...],
        songs: [...]
      },
      16: {
        id: 16, 
        name: "Metro Boomin",
        Description: "I make rap music",
        albums: [...],
        songs: [...]
      }
    },
    albums: {
      9: {
        id: 9, 
        title: "Harry's House",
        artist_id: 12,
        published_date: "05/20/2022",
        songs: [...],
        album_photo_url: (...)
      },
      20: {
        id: 20, 
        title: "Heroes and Villains",
        artist_id: 16,
        published_date: "12/02/2022",
        songs: [...],
        album_photo_url: (...)
      }
    } 
  },
  ui: {
    loading: true/false,
    listening: true/false
  },
  errors: {
    login: ["Username or Password was incorrect, please try again"],
    searchBar: ["The entity you searched could not be found, please try again"],
  },
  session: { currentUserId: 1 }
  } 

}

Clone this wiki locally