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.
|
- import React from "react";
- import { SearchParams } from "@/app/utils/fetchUtil";
- import { I18nProvider, getServerI18n } from "@/i18n";
- import { Typography } from "@mui/material";
- import isString from "lodash/isString";
- import { notFound } from "next/navigation";
- import UpdateMaintenanceForm from "@/components/UpdateMaintenance/UpdateMaintenanceForm";
-
- type Props = {} & SearchParams;
-
- const MaintenanceEditPage: React.FC<Props> = async ({ searchParams }) => {
- const type = "common";
- const { t } = await getServerI18n(type);
- const id = isString(searchParams["id"])
- ? parseInt(searchParams["id"])
- : undefined;
- if (!id) {
- notFound();
- }
- return (
- <>
- <Typography variant="h4">{t("Update Equipment Maintenance and Repair")}</Typography>
- <I18nProvider namespaces={[type]}>
- <UpdateMaintenanceForm id={id} />
- </I18nProvider>
- </>
- );
- };
- export default MaintenanceEditPage;
|