import { SearchParams } from "@/app/utils/fetchUtil"; import { TypeEnum } from "@/app/utils/typeEnum"; import CreateProductMaterial from "@/components/CreateItem"; import PoDetail from "@/components/PoDetail"; import { I18nProvider, getServerI18n } from "@/i18n"; import { Typography } from "@mui/material"; import isString from "lodash/isString"; import { notFound } from "next/navigation"; import { Suspense } from "react"; type Props = {} & SearchParams; const PoEdit: React.FC = async ({ searchParams }) => { const type = "purchaseOrder"; const { t } = await getServerI18n(type); console.log(searchParams["id"]); const id = isString(searchParams["id"]) ? parseInt(searchParams["id"]) : undefined; console.log(id); if (!id) { notFound(); } return ( <> {/* {t("Create Material")} */} }> ); }; export default PoEdit;