mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Update comments and image naming
This commit is contained in:
parent
5e47b79691
commit
7758b512d5
4 changed files with 6 additions and 2 deletions
|
|
@ -42,7 +42,7 @@
|
|||
font-weight: var(--fontWeightBold);
|
||||
|
||||
/* background map image */
|
||||
background-image: url(./images/map_icon@2x.png);
|
||||
background-image: url(./images/map_icon216x105.png);
|
||||
background-size: cover;
|
||||
|
||||
border-radius: 3px;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@ const SearchFiltersComponent = props => {
|
|||
const classes = classNames(rootClassName || css.root, className);
|
||||
|
||||
const onSelectSingle = (customAttribute, option) => {
|
||||
// name of the corresponding query parameter
|
||||
// Name of the corresponding query parameter.
|
||||
// The custom attribute query parameters are named
|
||||
// ca_<custom_attribute_name> in the API.
|
||||
const caParam = `ca_${customAttribute}`;
|
||||
|
||||
// query parameters after selecting the option
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
|
@ -41,6 +41,7 @@ const MODAL_BREAKPOINT = 768; // Search is in modal on mobile layout
|
|||
const SEARCH_WITH_MAP_DEBOUNCE = 300; // Little bit of debounce before search is initiated.
|
||||
const BOUNDS_FIXED_PRECISION = 8;
|
||||
|
||||
// extract search parameters, including a custom attribute named category
|
||||
const pickSearchParamsOnly = params => {
|
||||
const { address, origin, bounds, ca_category } = params || {};
|
||||
return { address, origin, bounds, ca_category };
|
||||
|
|
@ -90,6 +91,7 @@ export class SearchPageComponent extends Component {
|
|||
onIdle(googleMap) {
|
||||
const { history, location } = this.props;
|
||||
|
||||
// parse query parameters, including a custom attribute named category
|
||||
const { address, country, bounds, mapSearch, ca_category } = parse(location.search, {
|
||||
latlng: ['origin'],
|
||||
latlngBounds: ['bounds'],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue