"use client"; import { Box, Grid } from "@mui/material"; import { useSession } from "next-auth/react"; import { useTranslate } from "react-polyglot"; import { useAppContext } from "./AppProvider"; export const Welcome = () => { const t = useTranslate(); const { data: session } = useSession(); /* const { user: { name }, } = session as any; */ const name = "Test User"; const { colors: { white, leafcutterElectricBlue }, typography: { h1, h4, p }, } = useAppContext(); return ( {/* {name} */} {t("dashboardTitle")} {`${t( "welcome", )}, ${name?.split(" ")[0]}! 👋`} {t("dashboardDescription")} ); };