2024-04-12 15:54:23 +00:00
|
|
|
|
import { Typography, Box } from "@mui/material";
|
2024-04-13 23:48:51 +00:00
|
|
|
|
import { useUserStore } from "@root/user";
|
2024-04-12 15:54:23 +00:00
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
|
export const InfoPrivilege = () => {
|
2024-04-13 23:48:51 +00:00
|
|
|
|
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>
|
|
|
|
|
);
|
|
|
|
|
};
|