import { Person } from '@mui/icons-material'; import { Avatar, Box, Button, Card, CardActions, CardContent, Grid, Typography } from '@mui/material'; import { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { User } from '../../types/User'; import convertDate from '../../utils/date'; interface Props { user: User; canEdit?: boolean; } const Profile: FC = ({ user, canEdit }) => { const { t } = useTranslation(); return ( {t('Username')}: {user.username} {t('Email')}: {user.email} {t('Member since')}: {convertDate(user.memberSince)} {t('Post count')}: {user.postCount} {canEdit && } ); }; export default Profile;