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="container py-10 space-y-10">
      <div className="markdown">
        <ReactMarkdown>{tos?.markdown}</ReactMarkdown>
      </div>
    </div>
  );
}