Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | import { Box, Card, Link as MuiLink, Typography } from "@mui/material"; import Avatar from "components/Avatar"; import { DASHBOARD } from "i18n/namespaces"; import Link from "next/link"; import { useTranslation } from "next-i18next"; import { User } from "proto/api_pb"; import { routeToProfile } from "routes"; import { theme } from "theme"; export default function MinimalUserProfileCard({ user, }: { user: User.AsObject; }) { const { t } = useTranslation([DASHBOARD]); return ( <Card sx={{ display: "flex", flexDirection: "row", padding: theme.spacing(1, 2), }} > <Avatar user={user} highRes /> <Box sx={{ display: "flex", justifyContent: "flex-end", flexGrow: 1, paddingLeft: theme.spacing(2), overflow: "hidden", }} > <div> <Typography align="right">{user.city}</Typography> <Typography noWrap align="right"> <MuiLink component={Link} underline="hover" href={routeToProfile()}> {t("dashboard:profile_mobile_summary_view")} </MuiLink> </Typography> </div> </Box> </Card> ); } |