fixed image storage local on minio
This commit is contained in:
@@ -4,7 +4,7 @@ import { useChats } from "../hooks/useChats";
|
||||
import { useAuthContext } from "../context/AuthContext";
|
||||
import { useUnread } from "../context/UnreadContext";
|
||||
import { getPostForChat } from "../stores/chatPostStore";
|
||||
import { API_URL } from "../config/authConstants";
|
||||
import { getImageUrl } from "../config/authConstants";
|
||||
import { useDeleteChat } from "../hooks/useDeleteChat";
|
||||
import TrashIcon from "../components/icons/TrashIcon";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -75,7 +75,7 @@ export default function ChatListPage() {
|
||||
{!loading && chats.map((chat) => {
|
||||
const post = getPostForChat(chat.id);
|
||||
const title = post?.title || chat.otherUser?.name || t('chat.user');
|
||||
const imgSrc = post?.images?.[0] ? `${API_URL}${post.images[0]}` : null;
|
||||
const imgSrc = getImageUrl(post?.images?.[0]);
|
||||
const emoji = post?.emoji;
|
||||
const unreadCount = unreadMap[chat.id] ?? chat.unreadCount ?? chat.unreadMessages ?? 0;
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user