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

@@ -1,6 +1,6 @@
import { useState, useCallback, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { API_URL } from "../config/authConstants";
import { API_URL, getImageUrl } from "../config/authConstants";
import { useAuthContext } from "../context/AuthContext";
import MenuIcon from "../components/icons/MenuIcon";
import Sidebar from "../components/Sidebar";
@@ -140,7 +140,7 @@ export default function ReviewsPage() {
lastName: user.lastName || (user.name || "").trim().split(/\s+/).slice(1).join(" ") || "",
email: user.email || "",
phone: user.phone || "",
avatar: user.avatar && user.avatar.startsWith("/") ? `${API_URL}${user.avatar}` : user.avatar || null,
avatar: getImageUrl(user.avatar),
id: user.id,
}
: {};