Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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