fixed image storage local on minio

This commit is contained in:
SlimusMinus
2026-07-10 01:24:58 +03:00
parent 7e9053e498
commit a344540267
9 changed files with 37 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ import { useState } from "react";
import { useNavigate } from "react-router-dom";
import { useChats } from "../hooks/useChats";
import { useAuthContext } from "../context/AuthContext";
import { API_URL } from "../config/authConstants";
import { getImageUrl } from "../config/authConstants";
import DateCalendarPopup from "./DateCalendarPopup";
import { useTranslation } from 'react-i18next';
@@ -36,7 +36,7 @@ export default function PostOnFeed({ ad, liked, onLike, onEdit, onDelete, onMark
console.error(err);
}
};
const imageUrl = ad.images?.[0] ? `${API_URL}${ad.images[0]}` : null;
const imageUrl = getImageUrl(ad.images?.[0]);
// ✅ Формируем строку адреса из city + district
const address = [ad.city, ad.district].filter(Boolean).join(", ");