import type { StreamStatus } from "../types";
interface Props {
status: StreamStatus | null;
}
export default function StatusBar({ status }: Props) {
if (!status) {
return (
Connecting...
);
}
return (
{status.live ? "LIVE" : "Offline"}
{status.channel_name && (
<>
|
{status.channel_name}
{status.transitioning && (
Switching...
)}
>
)}
{status.upstream_down && (
<>
|
Upstream down?
>
)}
);
}