Skip to content

Commit

Permalink
too much of an effort defining how a missing video is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
sphinxrave committed Dec 30, 2024
1 parent b365161 commit 6c443bc
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions packages/react/src/components/video/VideoCardCountdownToLive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,14 @@ export function VideoCardCountdownToLive({

// Handle missing videos
if (video.status === "missing") {
if (video.start_actual) {
const tick = dayjs(video.start_actual);
return (
<TimeTooltip id={video.id} timestamp={tick} className={className}>
<div className="i-ph:image-broken inline-block align-text-bottom opacity-80" />
&nbsp;Streamed at {tick.format("LLL")}
</TimeTooltip>
if (video.start_actual || video.start_scheduled || video.available_at) {
const tick = dayjs(
video.start_actual || video.start_scheduled || video.available_at,
);
}
if (video.start_scheduled) {
const tick = dayjs(video.start_scheduled);
return (
<TimeTooltip id={video.id} timestamp={Date.now()} className={className}>
<TimeTooltip id={video.id} timestamp={tick} className={className}>
<div className="i-ph:image-broken inline-block align-text-bottom opacity-80" />
&nbsp;Scheduled for {tick.format("LLL")}
&nbsp;{tick.format("LLL")}
</TimeTooltip>
);
}
Expand Down

0 comments on commit 6c443bc

Please sign in to comment.