FPSMS-frontend
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

QcItemSaveWrapper.tsx 614 B

123456789101112131415161718192021222324
  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 (props) => {
  13. const qcItem = props.id ? await fetchQcItemDetails(props.id) : undefined;
  14. return <QcItemSave defaultInputs={qcItem} />;
  15. };
  16. QcItemSaveWrapper.Loading = QcItemSaveLoading;
  17. export default QcItemSaveWrapper;