mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Add worker link to test
This commit is contained in:
parent
0f251382e4
commit
0a830cee11
1 changed files with 5 additions and 1 deletions
|
@ -15,7 +15,10 @@ export function WorkerItem(props: {
|
||||||
errored?: boolean;
|
errored?: boolean;
|
||||||
success?: boolean;
|
success?: boolean;
|
||||||
errorText?: string;
|
errorText?: string;
|
||||||
|
url?: string;
|
||||||
}) {
|
}) {
|
||||||
|
const urlWithoutProtocol = props.url ? new URL(props.url).host : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex mb-2">
|
<div className="flex mb-2">
|
||||||
<Icon
|
<Icon
|
||||||
|
@ -36,6 +39,7 @@ export function WorkerItem(props: {
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="text-white font-bold">{props.name}</p>
|
<p className="text-white font-bold">{props.name}</p>
|
||||||
{props.errorText ? <p>{props.errorText}</p> : null}
|
{props.errorText ? <p>{props.errorText}</p> : null}
|
||||||
|
{urlWithoutProtocol ? <p>{urlWithoutProtocol}</p> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -115,7 +119,7 @@ export function WorkerTestPart() {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
if (s.status === "success")
|
if (s.status === "success")
|
||||||
return <WorkerItem name={name} success key={v.id} />;
|
return <WorkerItem name={name} url={v.url} success key={v.id} />;
|
||||||
return <WorkerItem name={name} key={v.id} />;
|
return <WorkerItem name={name} key={v.id} />;
|
||||||
})}
|
})}
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
Loading…
Reference in a new issue