aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-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 (