aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/lib')
-rw-r--r--src/client/react/lib/url.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/react/lib/url.js b/src/client/react/lib/url.js
index c94383c..644fd74 100644
--- a/src/client/react/lib/url.js
+++ b/src/client/react/lib/url.js
@@ -43,20 +43,20 @@ export function weekFromLocation(location) {
return purifyWeek(parseInt(weekStr, 10));
}
-export function makeSetUser(location, history) {
+export function makeSetUser(history) {
return (userId) => {
- const query = location.search;
+ const query = history.location.search;
history.push(`/${userId}${query}`);
};
}
-export function makeSetWeek(location, history) {
+export function makeSetWeek(history) {
return (week) => {
const query = queryString.stringify({
- ...queryString.parse(location.search),
+ ...queryString.parse(history.location.search),
week,
});
- history.push(`${location.pathname}?${query}`);
+ history.push(`${history.location.pathname}?${query}`);
};
}