import PortfolioPlanTable from "@/app/components/portfolio/measures/PlanTable";
import { getPortfolioMeasures } from "../../utils";
import { portfolioPlanColumns } from "@/app/components/portfolio/measures/PlanTableColumns";

export default async function PortfolioPlan(
  props: {
    params: Promise<{ slug: string }>;
  }
) {
  const params = await props.params;
  const portfolioId = params.slug;
  const portfolioMeasures = await getPortfolioMeasures(portfolioId);

  return (
    <>
      <div className="flex justify-center mt-8">
        {
          <PortfolioPlanTable
            data={portfolioMeasures}
            columns={portfolioPlanColumns}
          />
        }
      </div>
    </>
  );
}
