You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Koito/client/app/components/ArtistLinks.tsx

27 lines
585 B

import React from 'react';
import { Link } from 'react-router';
type Artist = {
id: number;
name: string;
};
type ArtistLinksProps = {
artists: Artist[];
};
const ArtistLinks: React.FC<ArtistLinksProps> = ({ artists }) => {
return (
<>
{artists.map((artist, index) => (
<span key={artist.id} className='color-fg-secondary'>
<Link className="hover:text-(--color-fg-tertiary)" to={`/artist/${artist.id}`}>{artist.name}</Link>
{index < artists.length - 1 ? ', ' : ''}
</span>
))}
</>
);
};
export default ArtistLinks;