diff --git a/client/src/components/Artist/ArtistLink.tsx b/client/src/components/Artist/ArtistLink.tsx index 50a47a286..f1c63d916 100644 --- a/client/src/components/Artist/ArtistLink.tsx +++ b/client/src/components/Artist/ArtistLink.tsx @@ -1,10 +1,16 @@ -import { Link } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; import { getArtistUrl } from "utils/artist"; const ArtistLink: React.FC<{ artist?: Artist }> = ({ artist }) => { + const location = useLocation(); if (!artist) { return null; } + + if (artist.urlSlug && location.pathname.includes(artist.urlSlug)) { + return artist.name; + } + return {artist?.name}; }; export default ArtistLink;