profile link

This commit is contained in:
2024-05-03 20:38:33 +02:00
parent 59818eb321
commit 675025800b
4 changed files with 43 additions and 25 deletions

View File

@@ -24,7 +24,7 @@ const PicturePlaceholderBox = styled(Box)((props) => ({
export default function ProfilePicture(props) {
const {user, ...other} = props;
const {user, size, ...other} = props;
const {translate: L} = useContext(LocaleContext);
const initials = (user.fullName || user.name)
@@ -35,6 +35,11 @@ export default function ProfilePicture(props) {
const isClickable = !!other.onClick;
const sx = isClickable ? {cursor: "pointer"} : {};
if (size) {
sx.width = size;
sx.height = size;
}
if (user.profilePicture) {
return <PictureBox src={`/img/uploads/user/${user.id}/${user.profilePicture}`} sx={sx}
alt={L("account.profile_picture_of") + " " + (user.fullName || user.name)}