Changeset 98992cf for frontend/src/components
- Timestamp:
- 01/30/26 00:08:04 (5 months ago)
- Branches:
- main
- Children:
- 2b08bed
- Parents:
- 6de2873
- Location:
- frontend/src/components/userProfile
- Files:
-
- 2 edited
-
ArtistView.tsx (modified) (1 diff)
-
ListenerView.tsx (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/components/userProfile/ArtistView.tsx
r6de2873 r98992cf 1 1 import { useNavigate } from "react-router-dom"; 2 2 import { Music, Disc3 } from "lucide-react"; 3 import type { ArtistContribution DTO} from "../../utils/types";3 import type { ArtistContribution } from "../../utils/types"; 4 4 5 5 interface ArtistViewProps { 6 contributions: ArtistContribution DTO[];6 contributions: ArtistContribution[]; 7 7 } 8 8 -
frontend/src/components/userProfile/ListenerView.tsx
r6de2873 r98992cf 1 1 import { useNavigate } from "react-router-dom"; 2 2 import { Heart, ListMusic, Music, Album } from "lucide-react"; 3 import type { Playlist, MusicalEntity DTO} from "../../utils/types";3 import type { Playlist, MusicalEntity } from "../../utils/types"; 4 4 5 5 interface ListenerViewProps { 6 likedEntities: MusicalEntity DTO[];7 playlists ?: Playlist[];6 likedEntities: MusicalEntity[] | []; 7 playlists: Playlist[] | []; 8 8 } 9 9 … … 11 11 const navigate = useNavigate(); 12 12 13 const likedSongs = likedEntities .filter((e) => e.type === "SONG");14 const likedAlbums = likedEntities .filter((e) => e.type === "ALBUM");13 const likedSongs = likedEntities?.filter((e) => e.type === "SONG"); 14 const likedAlbums = likedEntities?.filter((e) => e.type === "ALBUM"); 15 15 16 16 return ( … … 55 55 )} 56 56 57 {likedSongs .length > 0 && (57 {likedSongs && likedSongs.length > 0 && ( 58 58 <section> 59 59 <div className="flex items-center gap-2 mb-6 pb-2 border-b-2 border-gray-200"> … … 61 61 <h3 className="text-2xl font-bold text-gray-800">Liked Songs</h3> 62 62 <span className="text-sm text-gray-400 ml-1"> 63 ({likedSongs .length})63 ({likedSongs?.length}) 64 64 </span> 65 65 </div> … … 90 90 )} 91 91 92 {likedAlbums .length > 0 && (92 {likedAlbums && likedAlbums.length > 0 && ( 93 93 <section> 94 94 <div className="flex items-center gap-2 mb-6 pb-2 border-b-2 border-gray-200"> … … 120 120 )} 121 121 122 {likedEntities.length === 0 && (!playlists || playlists.length === 0) && ( 123 <div className="flex flex-col items-center justify-center py-16 text-gray-300"> 124 <p className="text-lg font-medium text-gray-400">Nothing here yet</p> 125 <p className="text-sm text-gray-400 mt-1"> 126 Start exploring music to build your collection 127 </p> 128 </div> 129 )} 122 {likedEntities && 123 likedEntities.length === 0 && 124 (!playlists || playlists.length === 0) && ( 125 <div className="flex flex-col items-center justify-center py-16 text-gray-300"> 126 <p className="text-lg font-medium text-gray-400"> 127 Nothing here yet 128 </p> 129 <p className="text-sm text-gray-400 mt-1"> 130 Start exploring music to build your collection 131 </p> 132 </div> 133 )} 130 134 </div> 131 135 );
Note:
See TracChangeset
for help on using the changeset viewer.
