diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-01-26 20:34:35 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-01-26 20:34:35 +0100 |
commit | 0c99c0b4d84f53675cc3d42fa518879789cc86b0 (patch) | |
tree | bd18b8daab5b999a811501454472537302d66e6f /src/client/react/components | |
parent | 19534b4770b4f4097b02f5fa021a24822b12d907 (diff) |
Make updateWeek sub 80 chars
Diffstat (limited to 'src/client/react/components')
-rw-r--r-- | src/client/react/components/container/WeekSelector.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/react/components/container/WeekSelector.js b/src/client/react/components/container/WeekSelector.js index 9f308f0..c9174ca 100644 --- a/src/client/react/components/container/WeekSelector.js +++ b/src/client/react/components/container/WeekSelector.js @@ -9,7 +9,11 @@ const WeekSelector = ({ urlWeek, location, history }) => { const updateWeek = (change) => { const newWeek = moment().week(urlWeek.week() + change); const isCurrentWeek = moment().week() === newWeek.week(); - history.push(`${location.pathname}?${queryString.stringify({ week: isCurrentWeek ? undefined : newWeek.week() })}`); + + const query = queryString.stringify({ + week: isCurrentWeek ? undefined : newWeek.week(), + }); + history.push(`${location.pathname}?${query}`); }; return ( |