import { useQuery } from "@tanstack/react-query"; import { Link } from "wouter"; import { type Article } from "@shared/schema"; import { format } from "date-fns"; import { de } from "date-fns/locale"; import { Play, ArrowLeft } from "lucide-react"; import { Skeleton } from "@/components/ui/skeleton"; import Header from "@/components/header"; import Footer from "@/components/footer"; import { ArticleCardAd } from "@/components/adsense"; function VideoCard({ article }: { article: Article }) { const thumbSrc = article.coverImage ? article.coverImage.replace(".webp", "-thumb.webp") : "/images/article-1.png"; return (
{article.title}

{article.title}

{format(new Date(article.publishedAt), "d. MMMM yyyy", { locale: de })}

); } function VideoCardSkeleton() { return (
); } export default function VideosPage() { const { data: articles, isLoading } = useQuery({ queryKey: ["/api/articles/category/Video"], }); return (
{isLoading ? (
{Array.from({ length: 4 }).map((_, i) => ( ))}
) : articles && articles.length > 0 ? (
{articles.flatMap((article, index) => { const items = [ , ]; if (index === 2) { items.push(); } return items; })}
) : (

Noch keine Videos vorhanden.

)}
); }