This commit is contained in:
2023-06-27 15:06:20 +01:00
parent f4ea779b0f
commit 5653a6b027
18 changed files with 307 additions and 15 deletions

View File

@ -3,6 +3,8 @@ import { Profile } from "./profile";
import "./video-tile.css";
import { NostrEvent, encodeTLV, NostrPrefix } from "@snort/system";
import { useInView } from "react-intersection-observer";
import { StatePill } from "./state-pill";
import { StreamState } from "index";
export function VideoTile({ ev }: { ev: NostrEvent }) {
const { inView, ref } = useInView({ triggerOnce: true });
@ -17,9 +19,7 @@ export function VideoTile({ ev }: { ev: NostrEvent }) {
<div style={{
backgroundImage: `url(${inView ? image : ""})`
}}>
<span className={`pill${isLive ? " live" : ""}`}>
{status}
</span>
<StatePill state={status as StreamState} />
</div>
<h3>{title}</h3>
<div>