1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-29 16:07:40 +01:00

Add worker link to test

This commit is contained in:
Cooper Ransom 2024-03-13 12:57:15 -04:00
parent 0f251382e4
commit 0a830cee11

View file

@ -15,7 +15,10 @@ export function WorkerItem(props: {
errored?: boolean;
success?: boolean;
errorText?: string;
url?: string;
}) {
const urlWithoutProtocol = props.url ? new URL(props.url).host : null;
return (
<div className="flex mb-2">
<Icon
@ -36,6 +39,7 @@ export function WorkerItem(props: {
<div className="flex-1">
<p className="text-white font-bold">{props.name}</p>
{props.errorText ? <p>{props.errorText}</p> : null}
{urlWithoutProtocol ? <p>{urlWithoutProtocol}</p> : null}
</div>
</div>
);
@ -115,7 +119,7 @@ export function WorkerTestPart() {
/>
);
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} />;
})}
<Divider />