FPSMS-frontend
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 

30 рядки
891 B

  1. import { SearchParams } from "@/app/utils/fetchUtil";
  2. import { TypeEnum } from "@/app/utils/typeEnum";
  3. import CreateEquipmentType from "@/components/CreateEquipment";
  4. import { I18nProvider, getServerI18n } from "@/i18n";
  5. import { Typography } from "@mui/material";
  6. import isString from "lodash/isString";
  7. import { notFound } from "next/navigation";
  8. type Props = {} & SearchParams;
  9. const productSetting: 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("Create Material")}</Typography> */}
  21. <I18nProvider namespaces={[type]}>
  22. <CreateEquipmentType id={id} />
  23. </I18nProvider>
  24. </>
  25. );
  26. };
  27. export default productSetting;