Move packages/apps back
This commit is contained in:
parent
6eaaf8e9be
commit
5535d6b575
348 changed files with 0 additions and 0 deletions
53
apps/leafcutter/components/Welcome.tsx
Normal file
53
apps/leafcutter/components/Welcome.tsx
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
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;
|
||||
const {
|
||||
colors: { white, leafcutterElectricBlue },
|
||||
typography: { h1, h4, p },
|
||||
} = useAppContext();
|
||||
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: "100%",
|
||||
backgroundColor: leafcutterElectricBlue,
|
||||
color: white,
|
||||
p: 4,
|
||||
borderRadius: "10px",
|
||||
mb: "22px",
|
||||
}}
|
||||
>
|
||||
<Grid container direction="row" spacing={3}>
|
||||
{/* <Grid
|
||||
item
|
||||
container
|
||||
xs={3}
|
||||
direction="column"
|
||||
justifyContent="flex-start"
|
||||
alignItems="center"
|
||||
>
|
||||
<img src={image} alt={name} width="150px" />
|
||||
</Grid> */}
|
||||
<Grid item xs={12}>
|
||||
<Box component="h1" sx={{ ...h1, mb: 1 }}>
|
||||
{t("dashboardTitle")}
|
||||
</Box>
|
||||
<Box component="h4" sx={{ ...h4, mt: 1, mb: 1 }}>{`${t("welcome")}, ${
|
||||
name?.split(" ")[0]
|
||||
}! 👋`}</Box>
|
||||
<Box component="p" sx={{ ...p }}>
|
||||
{t("dashboardDescription")}
|
||||
</Box>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue