24 lines
499 B
JavaScript
24 lines
499 B
JavaScript
import React from "react";
|
|
import "./Event.css";
|
|
|
|
function Event(props) {
|
|
|
|
let imgArray = [];
|
|
|
|
if (props.data.hasOwnProperty('screenshots')) {
|
|
props.data.screenshots.forEach(element => {
|
|
imgArray = [(<img src={element.url} className="eventPic"></img>), ...imgArray]
|
|
});
|
|
}
|
|
|
|
return (
|
|
<div className="eventDiv">
|
|
{JSON.stringify(props.data)}
|
|
<br></br>
|
|
{[...imgArray]}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Event;
|