FPSMS-frontend
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

JoSaveWrapper.tsx 555 B

1234567891011121314151617181920212223242526
  1. import React from "react";
  2. import GeneralLoading from "../General/GeneralLoading";
  3. import { fetchJoDetail } from "@/app/api/jo";
  4. import JoSave from "./JoSave";
  5. interface SubComponents {
  6. Loading: typeof GeneralLoading;
  7. }
  8. type JoSaveProps = {
  9. id?: number;
  10. }
  11. type Props = JoSaveProps
  12. const JoSaveWrapper: React.FC<Props> & SubComponents = async ({
  13. id,
  14. }) => {
  15. const jo = id ? await fetchJoDetail(id) : undefined
  16. return <JoSave id={id} defaultValues={jo}/>
  17. }
  18. JoSaveWrapper.Loading = GeneralLoading;
  19. export default JoSaveWrapper;