mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-16 23:51:11 +02:00
Updates screenshot component
This commit is contained in:
@ -11,11 +11,12 @@ const cardStyles = `
|
||||
}
|
||||
`;
|
||||
|
||||
const ScreenshotCard = (props: { data: { data: string }, title: string, actionButtons: any }): JSX.Element => {
|
||||
const ScreenshotCard = (props: { data: { image?: string, data?: string, }, title: string, actionButtons: any }): JSX.Element => {
|
||||
const screenshot = props.data;
|
||||
return (
|
||||
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
||||
<img src={screenshot.data} alt="Full page screenshot" />
|
||||
{ screenshot.image && <img src={`data:image/png;base64,${screenshot.image}`} alt="Full page screenshot" /> }
|
||||
{ (!screenshot.image && screenshot.data) && <img src={screenshot.data} alt="Full page screenshot" /> }
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user