import { fetchProjects } from "@/app/api/projects";
import React from "react";
import ProjectSearch from "./ProjectSearch";
import ProjectSearchLoading from "./ProjectSearchLoading";

interface SubComponents {
  Loading: typeof ProjectSearchLoading;
}

const ProjectSearchWrapper: React.FC & SubComponents = async () => {
  const projects = await fetchProjects();

  return <ProjectSearch projects={projects} />;
};

ProjectSearchWrapper.Loading = ProjectSearchLoading;

export default ProjectSearchWrapper;
