|
@@ -6,7 +6,6 @@ import './eventInfoShort.scss';
|
|
|
export class EventInfoShort extends React.Component {
|
|
|
render() {
|
|
|
const { title, country, city, eventDate, imgSrc, id } = this.props;
|
|
|
- const dateArr = new Date(eventDate).toDateString().split(' '); //date
|
|
|
return (
|
|
|
<div className="event-item">
|
|
|
<Link to={`/events/${id}`}>
|
|
@@ -16,11 +15,7 @@ export class EventInfoShort extends React.Component {
|
|
|
<div className="place">{country}, {city}</div>
|
|
|
</div>
|
|
|
<div className="event-date">
|
|
|
- {
|
|
|
- dateArr.map(
|
|
|
- (el, ind) => ind > 0 ? <span key={ind}>{el} </span> : null
|
|
|
- )
|
|
|
- }
|
|
|
+ { eventDate.map( (el,ind) =><span key={ind}>{el} </span>) }
|
|
|
</div>
|
|
|
<div className="bg-black"></div>
|
|
|
<div className="event-picture">
|