Path again
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user