import React from "react";
import GenerateMonthlyWorkHoursReportLoading from "./GenerateMonthlyWorkHoursReportLoading";
import { fetchProjects } from "@/app/api/projects";
import GenerateMonthlyWorkHoursReport from "./GenerateMonthlyWorkHoursReport";
import { fetchStaff } from "@/app/api/staff";

interface SubComponents {
  Loading: typeof GenerateMonthlyWorkHoursReportLoading;
}

const GenerateMonthlyWorkHoursReportWrapper: React.FC & SubComponents = async () => {
  const staffs = await fetchStaff();

  return <GenerateMonthlyWorkHoursReport staffs={staffs}/>;
};

GenerateMonthlyWorkHoursReportWrapper.Loading = GenerateMonthlyWorkHoursReportLoading;

export default GenerateMonthlyWorkHoursReportWrapper;