{desc1}
{desc2}
Upload it here.
'use client';
import { IStream } from "@futureporn/types";
// import NotFound from "app/streams/[cuid]/not-found";
import { IVod } from "@/app/lib/vods";
import Link from "next/link";
import Image from "next/legacy/image";
import { LocalizedDate } from "./localized-date";
import { FontAwesomeIcon, FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
import { faTriangleExclamation, faCircleInfo, faThumbsUp, IconDefinition, faO, faX, faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons";
import { Hemisphere, Moon } from "lunarphase-js";
import { useEffect, useState } from "react";
import { faXTwitter } from "@fortawesome/free-brands-svg-icons";
import { notFound } from "next/navigation";
export interface IStreamProps {
stream: IStream;
}
type Status = 'missing' | 'issue' | 'good';
interface StyleDef {
heading: string;
icon: IconDefinition;
desc1: string;
desc2: string;
}
function capitalizeFirstLetter(string: string): string {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function hasNote(vod: IVod) {
if (!!vod?.attributes?.note) return true;
else return false;
}
function determineStatus(stream: IStream): Status {
if (stream.attributes.vods.data.length < 1) {
return 'missing'
} else {
if (stream.attributes.vods.data.some((vod: IVod) => !hasNote(vod))) {
return 'good';
} else {
return 'issue';
}
}
}
export default function StreamPage({ stream }: IStreamProps) {
console.log('StreamPage function has been invoked! stream as follows')
console.log(stream)
if (!stream) notFound()
const displayName = stream.attributes.vtuber.data.attributes.displayName;
const date = new Date(stream.attributes.date);
const [hemisphere, setHemisphere] = useState(Hemisphere.NORTHERN);
const [selectedStatus, setSelectedStatus] = useState NotFound
//
//
//
// {JSON.stringify(stream, null, 2)}
//
//
Description | Details |
---|---|
Announcement | |
Platform | {platformsList} |
UTC Datetime | |
Local Datetime | {date.toLocaleDateString()} {date.toLocaleTimeString()} |
Lunar Phase | {Moon.lunarPhase(date)} {Moon.lunarPhaseEmoji(date, { hemisphere })} |
{desc1}
{desc2}
Upload it here.
ID | Upload Date | {/*Thumbnail | Duration | */}Tags | Timestamps | Note |
---|---|---|---|---|---|---|
{vod.attributes.cuid} | {vod.attributes.publishedAt} | {/*{(!!vod?.attributes?.thumbnail?.data?.attributes?.cdnUrl) ? |
{(!!vod?.attributes?.duration) ? vod.attributes.duration : | */}
{vod.attributes.tagVodRelations.data.length} | {vod.attributes.timestamps.data.length} | {(!!vod.attributes.note) ? |