{v.shortTitle}
{v.teaser && ({v.teaser}
)}Kapitel
-
{v.chapters.map((c) => (
- {c.t} {c.label} ))}
Zum Video
{v.description.replace(/\n{3,}/g, "\n\n")}
import { useQuery } from "@tanstack/react-query";
import { Link, useRoute } from "wouter";
import { ArrowLeft, Play, Clock, Youtube } from "lucide-react";
import Header from "@/components/header";
import Footer from "@/components/footer";
import { PageSideAds, TopBannerAd, MultiplexAd } from "@/components/adsense";
import { Skeleton } from "@/components/ui/skeleton";
import { format } from "date-fns";
import { de } from "date-fns/locale";
export interface YtVideo {
ytId: string;
slug: string;
title: string;
shortTitle: string;
rubrik: string;
publishedAt: string;
durationS: number;
teaser: string;
description: string;
chapters: { t: string; label: string }[];
tags: string[];
previewUrl: string;
previewS: number;
posterUrl: string;
youtubeUrl: string;
}
export function dauer(s: number) {
const m = Math.floor(s / 60);
const r = s % 60;
return `${m}:${String(r).padStart(2, "0")}`;
}
function RelatedCard({ v }: { v: YtVideo }) {
return (
{dauer(v.durationS)}
{v.shortTitle}
{v.teaser}
)}{v.description.replace(/\n{3,}/g, "\n\n")}