Skip to content

Sample State

johnhcody edited this page Oct 4, 2020 · 4 revisions

Take A Hike Sample State

{
  entities: {
    trails: {
      1: {
        id: 1,
        name: "Boulder Skyline Traverse",
        summary: "The classic long mountain route in Boulder.",
        state: "California",
        difficulty: "hard",
        ascent: 5480,
        high: 8454,
        low: 5423,
        latitude: 39.9388,
        longitude: -105.2582,
        location: "Boulder, Colorado",
        reviewIds: [6, 7, 12],
        conditionSatus: "All Clear",
        conditionDetails: "Dry",
        averageRating: 4.3
      },
      2: {
        id: 2,
        name: "Walker Ranch",
        summary: "An awesome and challenging hike near Boulder with great scenery.",
        state: "California",
        difficulty: "medium",
        ascent: 1594,
        high: 7335,
        low: 6439,
        latitude: 39.9511,
        longitude: -105.3378,
        location: "Boulder, Colorado",
        reviewIds: [6, 7, 12],
        conditionSatus: "All Clear",
        conditionDetails: "Dry",
        averageRating: 4.3
      },
    users: {
      1: {
        id: 1,
        userName: "bigtym3hik3r",
        firstName: "Bill",
        lastName: "Simmons",
        email: "bsimmons@gmail.com",  
        zipcode: 02347,
        birthdate: 09/07/1984,
        favoriteHikesId: [1, 3],
        reviewsIds: [1, 2, 5, 8]        
      },
      2: {
        id: 2,
        userName: "lostindawoodz",
        firstName: "Roger",
        lastName: "Jones",
        email: "rog.jones@gmail.com",  
        zipcode: 02561,
        birthdate: 12/11/1992,
        favoriteHikesId: [1, 3],
        reviewsIds: [1, 2, 5, 8]        
      }
    },
    reviews: {
      1: {
        id: 1,
        reviewerId: 3,
        hikeId: 4,
        body: "The trail is really well maintained, not too challenging, but no where to buy food nearby",  
        rating: 5,       
      },
      2: {
        id: 2,
        reviewerId: 4,
        hikerId: 12,
        body: "challenging, but the view is worth it!",  
        rating: 5,     
      },
  },
  ui: {
    loading: true/false,
    filters:
  },
  errors: {
    login: ["Incorrect username or password"],
    signUp: ["Zipcode cannot be blank", "First Name Field cannot be blank", "Last Name cannot be blank", "Email cannot be blank"]
    reviewForm: ["Review cannot be submitted if the body is blank"]
  },
  session: { currentUserId: 15 }
}

Clone this wiki locally