aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-01-26 20:34:35 +0100
committerNoah Loomans <noahloomans@gmail.com>2018-01-26 20:34:35 +0100
commit0c99c0b4d84f53675cc3d42fa518879789cc86b0 (patch)
treebd18b8daab5b999a811501454472537302d66e6f /src
parent19534b4770b4f4097b02f5fa021a24822b12d907 (diff)
Make updateWeek sub 80 chars
Diffstat (limited to 'src')
-rw-r--r--src/client/react/components/container/WeekSelector.js6
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 (