mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Add country to search params
This commit is contained in:
parent
5e69e1ad53
commit
23958657ec
2 changed files with 4 additions and 1 deletions
|
|
@ -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),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue