Add country to search params

This commit is contained in:
Hannu Lyytikainen 2018-02-15 15:59:09 +02:00
parent 5e69e1ad53
commit 23958657ec
2 changed files with 4 additions and 1 deletions

View file

@ -73,11 +73,12 @@ const validURLParamForExtendedData = (paramKey, urlParams) => {
// extract search parameters, including a custom attribute named category
const pickSearchParamsOnly = params => {
const { address, origin, bounds, ...rest } = params || {};
const { address, origin, bounds, country, ...rest } = params || {};
return {
address,
origin,
bounds,
country,
...validURLParamForExtendedData(CATEGORY_URL_PARAM, rest),
...validURLParamForExtendedData(AMENITIES_URL_PARAM, rest),
};

View file

@ -55,6 +55,7 @@ exports[`SearchPageComponent matches snapshot 1`] = `
Object {
"address": undefined,
"bounds": undefined,
"country": undefined,
"origin": undefined,
}
}
@ -97,6 +98,7 @@ exports[`SearchPageComponent matches snapshot 1`] = `
Object {
"address": undefined,
"bounds": undefined,
"country": undefined,
"origin": undefined,
}
}