export const dynamic = 'force-dynamic' import { Suspense } from "react"; import Link from 'next/link' import { ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid' import { Container } from '@/components/Container' import { FormattedDate } from '@/components/FormattedDate' import { getEpisodes } from '@/data/episodes' import Player from '@/app/Player' function EpisodeEntry({ episode }) { let date = new Date(episode.published) return (

{episode.title}

{episode.description}

Show notes {episode?.transcript && ( <> Transcript )}
) } function pageClasses(page, i) { return `inline-flex items-center border-t-2 border-transparent px-4 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 ${page === i ? 'border-indigo-500 text-indigo-600': ''}` }; async function Content({ page }) { const episodes = await getEpisodes() await new Promise(resolve => setTimeout(resolve, 1000)); const pages = Math.ceil(episodes.length / 10); return ( <>
{episodes.slice((page - 1) * 10, page * 10).map((episode) => ( ))}
); } function Skeleton({ width, height, className, color }) { const w = width ? '' : 'w-full'; const c = color ? color : 'bg-slate-200'; return (
); }; function EpisodeEntryLoading() { return (

) } function Loading() { // You can add any UI inside Loading, including a Skeleton. return (
{[0, 1, 2, 3, 4, 5, 6, 7].map((i) => ( ))}
); } export default async function Home({ searchParams }) { return ( <>

Episodes

}>
) }