import BlogData from "@comp/Blog/BlogData/page";
import React from "react";

async function getData(id) {
  const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/blog/${id}`);
  const post = await res.json();
  return post;
}

const page = async ({ params }) => {
  const data = await getData(params.id[0]);

  return <BlogData data={data} />;
};

export default page;
