-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
AAfghahi edited this page Sep 21, 2020
·
5 revisions
{
entities: {
user: {
1: {
id: 1,
username: gvwells,
first_name: Gaylynn,
last_name: Wells,
birthday: 04/04/1988,
gender: F,
age: 32,
weight: 110,
email: [email protected],
location: @40.6781078,-73.963494,
workout_id: [1,3],
route_id: [2]
},
2: {
id: 2,
username: A_Suri,
first_name: Arash,
last_name: Afghahi,
birthday: 02/17/1988,
gender: M,
age: 32,
weight: 155,
email: [email protected],
location: @40.6781078,-73.963494,
workout_id: [2],
route_id: [1]
}
},
workouts: {
1: {
id: 1,
athlete_id: 1,
title: "date night bike ride",
date: 09-12-2020,
duration: 00:20:57,
distance: 2.3,
elevation: 350,
sport: biking,
description: 'bike ride to the park'
image_url: 'www.google.com'
route_id: (optional)
},
2: {
id: 2,
title: "commute to work",
athlete_id: 2,
date: 06-24-2020,
duration: 00:37:30,
distance: 7.1,
elevation:-150,
sport: biking,
description: (optional)
image_url: 'www.google.com'
route_id: (optional)
},
3: {
id: 3,
title: "sunday morning run",
athlete_id: 1,
date: 09-13-2020,
duration: 01:20:30,
distance: 8.1,
elevation:500,
sport: running,
description: 'two loops around prospect, run back'
image_url: 'www.google.com'
route id: 1
}
}
routes: {
1: {
id: 1,
user_id: 1,
routeName: 'Prospect park loop',
estimatedTime: 1:00:00,
startLocation: @40.6781078,-73.963494,
endLocation: @35,-70.963494,
acitivityType: running,
description: (optional),
distance: 6.2,
elevation: 500,
image_url: 'www.google.com',
workouts: [3]
}
}
}
ui: {
loading: true/false
night mode: true/false (though, I will be honest, I don't know what other things go in here)
},
errors: {
login: ["Either your username or password is incorrect"],
workout: ["You must title your workout"],
},
session: { currentUserId: 1 }
}