Skip to content

Sample State

grantpaulson6 edited this page Apr 28, 2019 · 7 revisions
{
  entites: {
    users: {
      14: {
        id: 14,
        username: 'San Buena Ventura',
        firstname: 'Junipero',
        lastname: 'Serra',
        email: 'bythebeach@yahoo.com',
        about: 'I would like to host you in my mission'
      }
      126: {
        id: 126,
        username: 'Santa Rosa',
        firstname: 'Ferdinand',
        lastname: 'Magellin',
        email: 'sailsUP@gmail.com',
        about: 'I found this cute bay while I was sailing'
      }
    },
    listings: {
      40: {
        title: 'A mountain retreat',
        price: 25,
        description: 'A cute tent amonst the sequoias',
        owner_id: 14,
        max_guests: 3,
        num_beds: 1,
        num_bathrooms: 0,
        location: 'Yosemite'
      },
      121: {
        title: 'Island Oasis',
        price: 40,
        description: 'Come stay at our lovely shack on the beach of Santa Cruz island',
        owner_id: 126,
        max_guests: 5,
        num_beds: 0,
        num_bathrooms: 1,
        location: 'Channel Islands'
      }
    },
    bookings: {
      2000: {
        id: 2000,
        listing_id: 121,
        nomad_id: 200,
        start_date: 5/31/2019,
        end_date: 6/3/2019
      }
    },
    reviews: {
      1000: {
        id: 1000,
        author_id: 200,
        listing_id: 121,
        score: 4,
        review: 'It was delightful!'
      }
    }
  },
  ui: {
    loading: true / false
  },
  errors: {
    login: ['Username cant be blank']
  },
  session: {
    currentUserId: 14
  }
}

Clone this wiki locally