Path again

This commit is contained in:
2024-07-27 23:10:26 +02:00
parent 9d6bd65583
commit 72a0ad6364
9 changed files with 15 additions and 10 deletions
+4 -3
View File
@@ -21,6 +21,7 @@ import { Link, useNavigate } from '@tanstack/react-router';
import { FC, useState } from 'react';
import { useTranslation } from 'react-i18next';
import Api from '../../api/Api';
import { STORAGE_PATH } from '../../constanst';
import { PostAuth, PostNonAuth } from '../../types/Post';
import convertDate from '../../utils/date';
import PostEditDialog from '../Dialogs/PostEdit/PostEditDialog';
@@ -54,19 +55,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_PATH}${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_PATH}${post.user.image}`}>
<Person />
</Avatar>
</MUILink>
)
) : (
<Avatar alt={post.user.username} src={`/storage/${post.user.image}`}>
<Avatar alt={post.user.username} src={`${STORAGE_PATH}${post.user.image}`}>
<Person />
</Avatar>
)