import { fetchTeamProjects } from "@/app/api/teamprojects";
import React from "react";
import ProgressByTeamSearch from "./ProgressByTeamSearch";
import ProgressByTeamSearchLoading from "./ProgressByTeamSearchLoading";

interface SubComponents {
  Loading: typeof ProgressByTeamSearchLoading;
}

const ProgressByTeamSearchWrapper: React.FC & SubComponents = async () => {
  const teamprojects = await fetchTeamProjects();

  return <ProgressByTeamSearch projects={teamprojects} />;
};

ProgressByTeamSearchWrapper.Loading = ProgressByTeamSearchLoading;

export default ProgressByTeamSearchWrapper;
