FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 rivejä
622 B

  1. import React from "react"
  2. import QcItemSaveLoading from "./QcItemSaveLoading"
  3. import QcItemSave from "./QcItemSave";
  4. import { fetchQcItemDetails } from "@/app/api/settings/qcItem";
  5. interface SubComponents {
  6. Loading: typeof QcItemSaveLoading;
  7. }
  8. type SaveQcItemProps = {
  9. id?: string
  10. }
  11. type Props = SaveQcItemProps
  12. const QcItemSaveWrapper: React.FC<Props> & SubComponents = async (
  13. props
  14. ) => {
  15. const qcItem = props.id ? await fetchQcItemDetails(props.id) : undefined;
  16. return <QcItemSave defaultInputs={qcItem} />;
  17. };
  18. QcItemSaveWrapper.Loading = QcItemSaveLoading;
  19. export default QcItemSaveWrapper;