log-viewer/frontend/src/components/event/Event.js

24 lines
549 B
JavaScript
Raw Normal View History

2022-02-09 11:56:34 +00:00
import React from "react";
import "./Event.css";
function Event(props) {
let imgArray = [];
if (props.data.hasOwnProperty('screenshots')) {
props.data.screenshots.forEach(element => {
2022-03-06 06:18:01 +00:00
imgArray = [...imgArray, (<a href={element.orig} target="_blank"><img src={element.url} className="eventPic"></img></a>)]
});
}
2022-02-09 11:56:34 +00:00
return (
<div className="eventDiv">
2022-03-06 06:18:01 +00:00
{JSON.stringify(props.data.source)}
<br></br>
{[...imgArray]}
2022-02-09 11:56:34 +00:00
</div>
);
}
export default Event;