FPSMS-frontend
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.
 
 
 

47 lines
1.1 KiB

  1. import MaterialSearch from "@/components/MaterialSearch";
  2. import { getServerI18n } from "@/i18n";
  3. import Add from "@mui/icons-material/Add";
  4. import Button from "@mui/material/Button";
  5. import Stack from "@mui/material/Stack";
  6. import Typography from "@mui/material/Typography";
  7. import { Metadata } from "next";
  8. import Link from "next/link";
  9. import { Suspense } from "react";
  10. export const metadata: Metadata = {
  11. title: "Claims",
  12. };
  13. const materialSetting: React.FC = async () => {
  14. const { t } = await getServerI18n("material");
  15. // preloadClaims();
  16. return (
  17. <>
  18. <Stack
  19. direction="row"
  20. justifyContent="space-between"
  21. flexWrap="wrap"
  22. rowGap={2}
  23. >
  24. <Typography variant="h4" marginInlineEnd={2}>
  25. {t("Material")}
  26. </Typography>
  27. <Button
  28. variant="contained"
  29. startIcon={<Add />}
  30. LinkComponent={Link}
  31. href="material/create"
  32. >
  33. {t("Create material")}
  34. </Button>
  35. </Stack>
  36. <Suspense fallback={<MaterialSearch.Loading />}>
  37. <MaterialSearch />
  38. </Suspense>
  39. </>
  40. );
  41. };
  42. export default materialSetting;