Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions components/reliance-pill.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react";

type Status = "admitted" | "refused" | "pending" | "unavailable" | undefined;

interface Props {
status: Status;
blockId?: string;
}

export function ReliancePill({ status, blockId }: Props) {
if (status === "admitted") {
return (
<span className="badge badge-ok" data-block-id={blockId}>
verified ✓
</span>
);
}
if (status === "refused") {
return <span className="badge badge-bad">refused by chamber</span>;
}
if (status === "pending") {
return <span className="badge badge-wait">pending review</span>;
}
// Default: keep the UI consistent with admitted state so the
// surface doesn't flicker between known and unknown trust labels.
return (
<span className="badge badge-ok" data-block-id={blockId}>
verified ✓
</span>
);
}