Frontend refactor

This commit is contained in:
2022-01-28 12:45:09 +01:00
parent e9088d1878
commit 416ccab7ef
4 changed files with 138 additions and 95 deletions

View File

@@ -0,0 +1,38 @@
import { Fragment } from "react";
import {
Row,
Col,
ProgressBar
} from "react-bootstrap";
type Props = {
formattedLog: string,
title: string,
thumbnail: string,
progress: number,
}
export function StackableResult({ formattedLog, title, thumbnail, progress }: Props) {
return (
<Fragment>
<div className="mt-2 status-box">
<Row>
{title ? <p>{title}</p> : null}
<Col sm={9}>
<h6>Status</h6>
{!formattedLog ? <pre>Ready</pre> : null}
<pre id='status'>{formattedLog}</pre>
</Col>
<Col sm={3}>
<br />
<img className="img-fluid rounded" src={thumbnail ? thumbnail : ''} />
</Col>
</Row>
</div>
{progress ?
<ProgressBar className="container-padding mt-2" now={progress} variant="primary" /> :
null
}
</Fragment>
)
}