import { prisma } from '@/lib/prisma';
import ReactMarkdown from 'react-markdown';

export default async function TosPage() {
  const tos = await prisma.termsOfService.findFirst({
    orderBy: [{ version: "desc" }],
  })

  // console.log(tos?.markdown)

  return (
    <div className="mx-auto w-full max-w-6xl px-4 py-8">
      <div className="markdown">
        <ReactMarkdown>{tos?.markdown}</ReactMarkdown>
      </div>
    </div>
  );
}