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.

48 lines
1.2 KiB

  1. import { Metadata } from "next";
  2. import { getServerI18n, I18nProvider } 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 Link from "next/link";
  8. import { Suspense } from "react";
  9. import InvoiceSearch from "@/components/InvoiceSearch";
  10. export const metadata: Metadata = {
  11. title: "Invoice",
  12. };
  13. const Invoice: React.FC = async () => {
  14. const { t } = await getServerI18n("Invoice");
  15. return (
  16. <>
  17. <Stack
  18. direction="row"
  19. justifyContent="space-between"
  20. flexWrap="wrap"
  21. rowGap={2}
  22. >
  23. <Typography variant="h4" marginInlineEnd={2}>
  24. {t("Invoice")}
  25. </Typography>
  26. {/* <Button
  27. variant="contained"
  28. startIcon={<Add />}
  29. LinkComponent={Link}
  30. href="/invoice/new"
  31. >
  32. {t("Create Invoice")}
  33. </Button> */}
  34. </Stack>
  35. <Suspense fallback={<InvoiceSearch.Loading />}>
  36. <I18nProvider namespaces={['Invoice','common']}>
  37. <InvoiceSearch />
  38. </I18nProvider>
  39. </Suspense>
  40. </>
  41. )
  42. };
  43. export default Invoice;