Ignore:
Timestamp:
02/12/26 22:27:24 (5 months ago)
Author:
Filip Gavrilovski <filipgavrilovski28@…>
Branches:
main
Children:
85512ff
Parents:
d85e8e3
Message:

fix music cover ui bug

Location:
frontend/src/components/userProfile
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/components/userProfile/ArtistView.tsx

    rd85e8e3 rf5bc95e  
    33import { useNavigate } from "react-router-dom";
    44import { toast } from "react-toastify";
    5 import axiosInstance from "../../api/axiosInstance";
     5import axiosInstance, { baseURL } from "../../api/axiosInstance";
    66import type { ArtistContribution } from "../../utils/types";
    77import SongItem from "../SongItem";
     
    6565                                                                <div className="relative aspect-square rounded-lg mb-3 overflow-hidden shadow-md group-hover:shadow-xl transition-all duration-300 bg-[#181818]">
    6666                                                                        <img
    67                                                                                 src={album.cover || "/favicon.png"}
     67                                                                                src={
     68                                                                                        album.cover ? `${baseURL}/${album.cover}` : "/favicon.png"
     69                                                                                }
    6870                                                                                alt={album.title}
    6971                                                                                className="w-full h-full object-cover"
  • frontend/src/components/userProfile/ListenerView.tsx

    rd85e8e3 rf5bc95e  
    33import { useNavigate } from "react-router-dom";
    44import { toast } from "react-toastify";
    5 import axiosInstance from "../../api/axiosInstance";
     5import axiosInstance, { baseURL } from "../../api/axiosInstance";
    66import type { MusicalEntity, Playlist } from "../../utils/types";
    77import SongItem from "../SongItem";
     
    9494                                                                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
    9595                                                                        <img
    96                                                                                 src={playlist.cover || "/favicon.png"}
     96                                                                                src={
     97                                                                                        playlist.cover
     98                                                                                                ? `${baseURL}/${playlist.cover}`
     99                                                                                                : "/favicon.png"
     100                                                                                }
    97101                                                                                alt={playlist.name}
    98102                                                                                className="w-full h-full object-cover"
     
    147151                                                                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
    148152                                                                        <img
    149                                                                                 src={playlist.cover || "/favicon.png"}
     153                                                                                src={
     154                                                                                        playlist.cover
     155                                                                                                ? `${baseURL}/${playlist.cover}`
     156                                                                                                : "/favicon.png"
     157                                                                                }
    150158                                                                                alt={playlist.name}
    151159                                                                                className="w-full h-full object-cover"
     
    194202                                                                        id: song.id,
    195203                                                                        title: song.title,
    196                                                                         cover: song.cover,
     204                                                                        cover: song.cover
     205                                                                                ? `${baseURL}/${song.cover}`
     206                                                                                : "/favicon.png",
    197207                                                                        genre: song.genre,
    198208                                                                        link: (song as any).link,
     
    227237                                                                <div className="relative aspect-square rounded-lg overflow-hidden bg-[#181818] mb-3 shadow-md group-hover:shadow-xl transition-all">
    228238                                                                        <img
    229                                                                                 src={album.cover || "/favicon.png"}
     239                                                                                src={
     240                                                                                        album.cover ? `${baseURL}/${album.cover}` : "/favicon.png"
     241                                                                                }
    230242                                                                                alt={album.title}
    231243                                                                                className="w-full h-full object-cover"
Note: See TracChangeset for help on using the changeset viewer.