Commit 8ff4459a authored by Andrew Hrdy's avatar Andrew Hrdy
Browse files

Fix error caused from linting change.

parent 2806cdb7
...@@ -27,8 +27,9 @@ export const setFacilities = (facilities) => { ...@@ -27,8 +27,9 @@ export const setFacilities = (facilities) => {
try { try {
localStorage.setItem('facilities', facilities); localStorage.setItem('facilities', facilities);
} catch (e) { } catch (e) {
console.error('Set localstorage fail for facilities.'); //Empty
} }
return { return {
type: SET_FACILITIES, type: SET_FACILITIES,
facilities: JSON.parse(facilities) facilities: JSON.parse(facilities)
......
...@@ -14,18 +14,22 @@ const WeekHours = ({facility}) => { ...@@ -14,18 +14,22 @@ const WeekHours = ({facility}) => {
]; ];
const output = []; const output = [];
let index = 0; try {
for (let dayOfWeek = 0; dayOfWeek < 7; dayOfWeek++) { let index = 0;
const todaysHours = facilityUtils.getHoursByDay(facility, dayOfWeek); for (let dayOfWeek = 0; dayOfWeek < 7; dayOfWeek++) {
for (let i = 0; i < todaysHours.length; i++) { const todaysHours = facilityUtils.getHoursByDay(facility, dayOfWeek);
output[index] = ( for (let i = 0; i < todaysHours.length; i++) {
<Grid container spacing={0} key={facility.slug + index} className="week-hours-row"> output[index] = (
<Grid item xs={2} className="week-hours-day">{weekDays[dayOfWeek]}</Grid> <Grid container spacing={0} key={facility.slug + index} className="week-hours-row">
<Grid item className="week-hours-times">{todaysHours[i].text}</Grid> <Grid item xs={2} className="week-hours-day">{weekDays[dayOfWeek]}</Grid>
</Grid> <Grid item className="week-hours-times">{todaysHours[i].text}</Grid>
); </Grid>
index++; );
index++;
}
} }
} catch (e) {
//Empty
} }
return ( return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment