Update comments and image naming

This commit is contained in:
Hannu Lyytikainen 2018-01-09 15:52:03 +02:00
parent 5e47b79691
commit 7758b512d5
4 changed files with 6 additions and 2 deletions

View file

@ -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;

View file

@ -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

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -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'],