Ignore:
Timestamp:
02/07/26 21:16:37 (5 months ago)
Author:
Filip Gavrilovski <filipgavrilovski28@…>
Branches:
main
Children:
799f27d
Parents:
8675f75
Message:

clickable items now take the user to the respective pages; added artist username and album id to dto-s

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/components/search/AlbumResult.tsx

    r8675f75 r8ccb07e  
     1import { useNavigate } from "react-router-dom";
    12import type { Album } from "../../utils/types";
    23
     
    67
    78const AlbumResult = ({ album }: AlbumResultProps) => {
     9        const navigate = useNavigate();
     10
    811        return (
    9                 <div className="flex items-center gap-4 p-3 rounded-lg hover:bg-white/5 cursor-pointer transition-colors group">
     12                <div
     13                        onClick={() => navigate(`/collection/album/${album.id}`)}
     14                        className="flex items-center gap-4 p-3 rounded-lg hover:bg-white/5 cursor-pointer transition-colors group"
     15                >
    1016                        <img
    1117                                src={album.cover || "/favicon.png"}
Note: See TracChangeset for help on using the changeset viewer.