feat(frontend): add basic frontend
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { Badge } from "../../../shared/ui/badge";
|
||||
import type { WsStatus } from "../model/types";
|
||||
|
||||
const toneByStatus: Record<WsStatus, string> = {
|
||||
connecting: "bg-slate-600",
|
||||
open: "bg-emerald-600",
|
||||
reconnecting: "bg-amber-600",
|
||||
disconnected: "bg-rose-600",
|
||||
};
|
||||
|
||||
export function WsStatusBadge({ status }: { status: WsStatus }) {
|
||||
return (
|
||||
<Badge className={`${toneByStatus[status]} text-white`}>ws: {status}</Badge>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user