import React from "react";
import UserSearch from "./UserSearch";
import UserSearchLoading from "./UserSearchLoading";
import { UserResult, fetchUser } from "@/app/api/user";

interface SubComponents {
  Loading: typeof UserSearchLoading;
}

const UserSearchWrapper: React.FC & SubComponents = async () => {
const users = await fetchUser()
  console.log(users);

  return <UserSearch users={users} />;
};

UserSearchWrapper.Loading = UserSearchLoading;

export default UserSearchWrapper;
