frontPanel/src/pages/InfoPrivilege.tsx

28 lines
792 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Typography, Box } from "@mui/material";
import { useUserStore } from "@root/user";
import { Link } from "react-router-dom";
export const InfoPrivilege = () => {
const user = useUserStore();
return (
<Box>
<Link to="/list">К списку квизов</Link>
{Object.values(user?.userAccount?.privileges || {}).map((privilege) => {
return (
<Box
sx={{
border: "1px solid",
margin: "0 10px",
display: "flex",
justifyContent: "space-around",
padding: "5px 0",
}}
>
<Typography>{privilege?.privilege_name}</Typography>
<Typography>{privilege?.amount}</Typography>
</Box>
);
})}
</Box>
);
};