Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

19 строки
656 B

  1. import { fetchAllCustomers } from "@/app/api/customer";
  2. import React from "react";
  3. import CustomerSearch from "./CustomerSearch";
  4. import CustomerSearchLoading from "./CustomerSearchLoading";
  5. import { getUserAbilities } from "@/app/utils/commonUtil";
  6. interface SubComponents {
  7. Loading: typeof CustomerSearchLoading;
  8. }
  9. const CustomerSearchWrapper: React.FC & SubComponents = async () => {
  10. const [customers, abilities] = await Promise.all([fetchAllCustomers(), getUserAbilities()]);
  11. return <CustomerSearch customers={customers} abilities={abilities}/>;
  12. };
  13. CustomerSearchWrapper.Loading = CustomerSearchLoading;
  14. export default CustomerSearchWrapper;