chadtmiller.com/pds.js
An atproto PDS in JavaScript, for Cloudflare Workers and Node
0
0
// How each review verdict reads, wherever one is shown.
import { CheckIcon, MessageSquareIcon, XIcon } from 'lucide-react';
const VERDICTS = {
approve: { label: 'approved', className: 'text-success', Icon: CheckIcon },
changesRequested: {
label: 'asked for changes',
className: 'text-destructive',
Icon: XIcon,
},
comment: {
label: 'commented',
className: 'text-muted-foreground',
Icon: MessageSquareIcon,
},
};
/**
* An unknown verdict reads as a comment.
* @param {string|undefined} verdict
*/
export const verdictLook = (verdict) =>
VERDICTS[/** @type {keyof typeof VERDICTS} */ (verdict)] ?? VERDICTS.comment;