diff --git a/src/Components/GasStation.js b/src/Components/GasStation.js index 5b547a6..97f93c1 100644 --- a/src/Components/GasStation.js +++ b/src/Components/GasStation.js @@ -2,6 +2,7 @@ import React from 'react'; import { Modal, Button, ListGroup } from "react-bootstrap"; import PropTypes from 'prop-types'; import { FaWaze } from "react-icons/fa"; +import { GiPositionMarker } from "react-icons/gi"; import { gasTypes } from "../config"; import { capitalizeFirstLetter, lowerCaseString } from "../helpers"; @@ -37,8 +38,8 @@ class GasStation extends React.Component { {station.prices ? station.prices.map(price => { return ( - {`${this.renderGasType(price.gasType)} : ${price.price} € `} - + {`${this.renderGasType(price.gasType)} : ${price.price.toString().replace('.', ',')} € `} + ); }) : (null)} @@ -60,6 +61,21 @@ class GasStation extends React.Component { return `${lowerCaseString(station.address)} - ${capitalizeFirstLetter(station.city)}`; } + renderAddress = () => { + const { + station, + } = this.props; + + return ( +

+ + {lowerCaseString(station.address)} + {' - '} + {capitalizeFirstLetter(station.city)} +

+ ); + } + render () { const { showModal, @@ -80,6 +96,7 @@ class GasStation extends React.Component { + {this.renderAddress()} {this.renderPrices()}