FPSMS-frontend
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

38 rindas
1.0 KiB

  1. import { authOptions } from "@/config/authConfig"
  2. import { getServerSession, Session } from "next-auth"
  3. import DashboardPage from "./DashboardPage"
  4. import { Typography } from "@mui/material"
  5. import { I18nProvider, getServerI18n } from "@/i18n";
  6. import DashboardLoading from "./DashboardLoading";
  7. // export type SessionWithAbilities = {
  8. // abilities: string[]
  9. // } & Session | null
  10. interface SubComponents {
  11. Loading: typeof DashboardLoading;
  12. }
  13. type Props = {
  14. searchParams: { [key: string]: string | string[] | undefined };
  15. }
  16. const DashboardWrapper: React.FC<Props> & SubComponents = async ({
  17. searchParams
  18. }) => {
  19. const { t } = await getServerI18n("dashboard");
  20. // const session: SessionWithAbilities = await getServerSession(authOptions)
  21. return (
  22. <>
  23. <Typography variant="h4">{t("Dashboard")}</Typography>
  24. <DashboardPage
  25. // abilities={session ? session?.abilities : []}
  26. />
  27. </>
  28. )
  29. }
  30. DashboardWrapper.Loading = DashboardLoading;
  31. export default DashboardWrapper