This commit is contained in:
2024-07-27 23:06:37 +02:00
parent 2c9f8caff4
commit 9d6bd65583
8 changed files with 10 additions and 10 deletions
@@ -109,8 +109,8 @@ const UserImageDialog: FC<Props> = ({ user, open, onClose }) => {
formState.image
? URL.createObjectURL(formState.image)
: formState.predefined
? `storage/profilbilder/default/${formState.predefined}.svg`
: `storage/${user.image}`
? `/storage/profilbilder/default/${formState.predefined}.svg`
: `/storage/${user.image}`
}
sx={{ width: '100px', height: '100px' }}
>
+1 -1
View File
@@ -61,7 +61,7 @@ const Header: FC = () => {
</IconButton>
{user ? (
<IconButton onClick={(event) => setAnchorUserMenu(event.currentTarget)} sx={{ p: 0 }}>
<Avatar alt={user.username} src={`storage/${user.image}`}>
<Avatar alt={user.username} src={`/storage/${user.image}`}>
<Person />
</Avatar>
</IconButton>
+3 -3
View File
@@ -54,19 +54,19 @@ const Post: FC<Props> = ({ post, disableActions }) => {
!disableActions && 'id' in post.user ? (
post.user.id !== Api.getAuthenticatedUser()?.id ? (
<MUILink component={Link} to="/profile/$id" params={{ id: post.user.id }}>
<Avatar alt={post.user.username} src={`storage/${post.user.image}`}>
<Avatar alt={post.user.username} src={`/storage/${post.user.image}`}>
<Person />
</Avatar>
</MUILink>
) : (
<MUILink component={Link} to="/profile">
<Avatar alt={post.user.username} src={`storage/${post.user.image}`}>
<Avatar alt={post.user.username} src={`/storage/${post.user.image}`}>
<Person />
</Avatar>
</MUILink>
)
) : (
<Avatar alt={post.user.username} src={`storage/${post.user.image}`}>
<Avatar alt={post.user.username} src={`/storage/${post.user.image}`}>
<Person />
</Avatar>
)
@@ -40,7 +40,7 @@ const Profile: FC<Props> = ({ user, posts, canEdit }) => {
<Grid container spacing={2}>
<Grid item sx={{ display: 'flex', flexGrow: 1, justifyContent: 'center' }}>
<IconButton onClick={() => setImageOpen(true)}>
<Avatar alt={user.username} src={`storage/${user.image}`} sx={{ width: '100px', height: '100px' }}>
<Avatar alt={user.username} src={`/storage/${user.image}`} sx={{ width: '100px', height: '100px' }}>
<Person sx={{ width: '60px', height: '60px' }} />
</Avatar>
</IconButton>