mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Rename SearchMapListingCard to SearchMapInfoCard (since it's functionally infowindow and doesn't contain just one listing
This commit is contained in:
parent
31d6a15c98
commit
590d18d42b
5 changed files with 12 additions and 12 deletions
|
|
@ -5,7 +5,7 @@ import { groupBy, isEqual, reduce } from 'lodash';
|
|||
import { types as sdkTypes } from '../../util/sdkLoader';
|
||||
import * as propTypes from '../../util/propTypes';
|
||||
import { googleBoundsToSDKBounds } from '../../util/googleMaps';
|
||||
import { SearchMapListingCard, SearchMapPriceLabel, SearchMapGroupLabel } from '../../components';
|
||||
import { SearchMapInfoCard, SearchMapPriceLabel, SearchMapGroupLabel } from '../../components';
|
||||
|
||||
import css from './SearchMap.css';
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ const MapWithGoogleMap = withGoogleMap(props => {
|
|||
|
||||
const listingsArray = Array.isArray(infoCardOpen) ? infoCardOpen : [infoCardOpen];
|
||||
const openedCard = infoCardOpen
|
||||
? <SearchMapListingCard
|
||||
? <SearchMapInfoCard
|
||||
key={listingsArray[0].id.uuid}
|
||||
className={INFO_CARD_HANDLE}
|
||||
listings={listingsArray}
|
||||
|
|
@ -222,7 +222,7 @@ export class SearchMapComponent extends Component {
|
|||
const classes = classNames(rootClassName || css.root, className);
|
||||
const mapClasses = mapRootClassName || css.mapRoot;
|
||||
|
||||
// container element listens clicks so that opened SearchMapListingCards can be closed
|
||||
// container element listens clicks so that opened SearchMapInfoCard can be closed
|
||||
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
||||
return (
|
||||
<MapWithGoogleMap
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { createResourceLocatorString } from '../../util/routes';
|
|||
import { createSlug } from '../../util/urlHelpers';
|
||||
import { ResponsiveImage } from '../../components';
|
||||
|
||||
import css from './SearchMapListingCard.css';
|
||||
import css from './SearchMapInfoCard.css';
|
||||
|
||||
// Center label so that caret is pointing to correct pixel.
|
||||
// (vertical positioning: height + arrow) */
|
||||
|
|
@ -68,7 +68,7 @@ const ListingCard = props => {
|
|||
<ResponsiveImage
|
||||
rootClassName={classNames(css.rootForImage, css.borderRadiusInheritTop)}
|
||||
alt={title}
|
||||
noImageMessage={intl.formatMessage({ id: 'SearchMapListingCard.noImage' })}
|
||||
noImageMessage={intl.formatMessage({ id: 'SearchMapInfoCard.noImage' })}
|
||||
image={firstImage}
|
||||
nameSet={[
|
||||
{ name: 'landscape-crop', size: '1x' },
|
||||
|
|
@ -108,7 +108,7 @@ ListingCard.propTypes = {
|
|||
isInCarousel: bool.isRequired,
|
||||
};
|
||||
|
||||
class SearchMapListingCard extends Component {
|
||||
class SearchMapInfoCard extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
|
|
@ -192,13 +192,13 @@ class SearchMapListingCard extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
SearchMapListingCard.defaultProps = {
|
||||
SearchMapInfoCard.defaultProps = {
|
||||
className: null,
|
||||
rootClassName: null,
|
||||
onClickCallback: null,
|
||||
};
|
||||
|
||||
SearchMapListingCard.propTypes = {
|
||||
SearchMapInfoCard.propTypes = {
|
||||
className: string,
|
||||
rootClassName: string,
|
||||
listings: arrayOf(propTypes.listing).isRequired,
|
||||
|
|
@ -216,4 +216,4 @@ SearchMapListingCard.propTypes = {
|
|||
intl: intlShape.isRequired,
|
||||
};
|
||||
|
||||
export default compose(withRouter, withFlattenedRoutes, injectIntl)(SearchMapListingCard);
|
||||
export default compose(withRouter, withFlattenedRoutes, injectIntl)(SearchMapInfoCard);
|
||||
|
|
@ -43,7 +43,7 @@ import SaleDetailsPanel from './SaleDetailsPanel/SaleDetailsPanel';
|
|||
import SearchIcon from './SearchIcon/SearchIcon';
|
||||
import SearchMap from './SearchMap/SearchMap';
|
||||
import SearchMapGroupLabel from './SearchMapGroupLabel/SearchMapGroupLabel';
|
||||
import SearchMapListingCard from './SearchMapListingCard/SearchMapListingCard';
|
||||
import SearchMapInfoCard from './SearchMapInfoCard/SearchMapInfoCard';
|
||||
import SearchMapPriceLabel from './SearchMapPriceLabel/SearchMapPriceLabel';
|
||||
import SearchResultsPanel from './SearchResultsPanel/SearchResultsPanel';
|
||||
import SelectField from './SelectField/SelectField';
|
||||
|
|
@ -106,7 +106,7 @@ export {
|
|||
SearchIcon,
|
||||
SearchMap,
|
||||
SearchMapGroupLabel,
|
||||
SearchMapListingCard,
|
||||
SearchMapInfoCard,
|
||||
SearchMapPriceLabel,
|
||||
SearchResultsPanel,
|
||||
SecondaryButton,
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@
|
|||
"SalePage.rejectButton": "Decline",
|
||||
"SalePage.rejectSaleFailed": "Rejecting sale failed.",
|
||||
"SalePage.title": "Sale details: {title}",
|
||||
"SearchMapListingCard.noImage": "No image",
|
||||
"SearchMapInfoCard.noImage": "No image",
|
||||
"SearchPage.foundResults": "{count, number} {count, plural, one {sauna} other {saunas}} found",
|
||||
"SearchPage.foundResultsWithAddress": "{count, number} {count, plural, one {sauna} other {saunas}} around {address}",
|
||||
"SearchPage.loadingResults": "Loading search results…",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue