diff options
-rw-r--r-- | src/client/react/components/container/View.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/client/react/components/container/View.js b/src/client/react/components/container/View.js index 7c0d42c..407a7de 100644 --- a/src/client/react/components/container/View.js +++ b/src/client/react/components/container/View.js @@ -65,16 +65,14 @@ class View extends React.Component { const schedule = extractSchedule(schedules, user, week); if (schedule.state === 'NOT_REQUESTED') { - fetch(`/get/${user}?week=${week}`).then( + fetch(`/get/${user}?week=${week}`).then(r => r.text()).then( // success - (r) => { - r.text().then((htmlStr) => { - dispatch({ - type: 'VIEW/FETCH_SCHEDULE_SUCCESS', - user, - week, - htmlStr, - }); + (htmlStr) => { + dispatch({ + type: 'VIEW/FETCH_SCHEDULE_SUCCESS', + user, + week, + htmlStr, }); }, |