import LinkAnchor from 'components/mdx/link-anchor'; import GistsCode from 'components/pages/gists/gists-code'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; import { getSignalGist } from 'lib/fetcher'; import Image from 'next/image'; import Link from 'next/link'; import { notFound } from 'next/navigation'; import avatar from 'public/images/img/avatar.svg'; export const revalidate = 600; dayjs.extend(relativeTime); export default async function Page({ params, }: { params: Promise<{ id: string; }>; }) { const { id } = await params; if (typeof id !== 'string') notFound(); const gist = await getSignalGist(id); if (!gist || !gist.files) notFound(); return ( <>
Last active: {dayjs(gist.updated_at).fromNow()}
{gist.description}
{Object.keys(gist.files).map((f) => (