import fs from "fs/promises";
import path from "path";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";

export default async function TodoPage() {
  const filePath = path.join(process.cwd(), "ToDo.md")
  const content = await fs.readFile(filePath, "utf-8")

  return (
    <main className="markdown max-w-3xl mx-auto p-6">
      <ReactMarkdown
        remarkPlugins={[remarkGfm]}
      >
        {content}
      </ReactMarkdown>
    </main>
  );
}