FPSMS-frontend
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

29 satır
922 B

  1. import React from "react";
  2. import { SearchParams } from "@/app/utils/fetchUtil";
  3. import { I18nProvider, getServerI18n } from "@/i18n";
  4. import { Typography } from "@mui/material";
  5. import isString from "lodash/isString";
  6. import { notFound } from "next/navigation";
  7. import UpdateMaintenanceForm from "@/components/UpdateMaintenance/UpdateMaintenanceForm";
  8. type Props = {} & SearchParams;
  9. const MaintenanceEditPage: React.FC<Props> = async ({ searchParams }) => {
  10. const type = "common";
  11. const { t } = await getServerI18n(type);
  12. const id = isString(searchParams["id"])
  13. ? parseInt(searchParams["id"])
  14. : undefined;
  15. if (!id) {
  16. notFound();
  17. }
  18. return (
  19. <>
  20. <Typography variant="h4">{t("Update Equipment Maintenance and Repair")}</Typography>
  21. <I18nProvider namespaces={[type]}>
  22. <UpdateMaintenanceForm id={id} />
  23. </I18nProvider>
  24. </>
  25. );
  26. };
  27. export default MaintenanceEditPage;