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.
 
 

53 line
1.4 KiB

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