import { api } from "@/trpc/server";
import MainPage from "./_components/main-page";
import { Article } from "@/server/db/schema";

export default async function Home() {
  const articles = await api.article.getAll({ limit: 12 });
  const categories = await api.category.getAll({ limit: 6 });
  return (
    <>
      <MainPage initialData={{ articles: articles as Article[], categories }} />
    </>
  );
}
