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.
 
 

30 lines
830 B

  1. import { Metadata } from "next";
  2. import { I18nProvider } from "@/i18n";
  3. import { Suspense } from "react";
  4. import { getServerI18n } from "@/i18n";
  5. import DashboardPage from "@/components/DashboardPage";
  6. import { SearchParams } from "@/app/utils/fetchUtil";
  7. import { fetchEscalationLogsByUser } from "@/app/api/escalation";
  8. export const metadata: Metadata = {
  9. title: "Dashboard",
  10. };
  11. type Props = {} & SearchParams;
  12. const Dashboard: React.FC<Props> = async ({ searchParams }) => {
  13. const { t } = await getServerI18n("dashboard");
  14. fetchEscalationLogsByUser()
  15. return (
  16. <I18nProvider namespaces={["dashboard", "common", "purchaseOrder"]}>
  17. <Suspense fallback={<DashboardPage.Loading />}>
  18. <DashboardPage searchParams={searchParams} />
  19. </Suspense>
  20. </I18nProvider>
  21. );
  22. };
  23. export default Dashboard;