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.
 
 

32 line
854 B

  1. import CreateDepartment from "@/components/CreateDepartment";
  2. import { I18nProvider, getServerI18n } from "@/i18n";
  3. import Typography from "@mui/material/Typography";
  4. import { Metadata } from "next";
  5. export const metadata: Metadata = {
  6. title: "Create Department",
  7. };
  8. interface Props {
  9. searchParams: { [key: string]: string | undefined };
  10. }
  11. const Department: React.FC<Props> = async ({searchParams}) => {
  12. const { t } = await getServerI18n("departments");
  13. // Preload necessary dependencies
  14. // Assume projectId is string here
  15. const departmentId = searchParams["id"];
  16. return (
  17. <>
  18. <Typography variant="h4">{t("Create Department")}</Typography>
  19. <I18nProvider namespaces={["departments"]}>
  20. <CreateDepartment isEdit={true} departmentId={departmentId}/>
  21. </I18nProvider>
  22. </>
  23. );
  24. };
  25. export default Department;