Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
Something went wrong. Try again.
1.3 kB · 42 lines
TSX
at playEdit
123456789101112131415161718192021222324252627282930313233343536373839404142import { Fragment } from 'react';import type { ArtistCredit as AC } from '../../core/Atomic';
import { HStack, Tag } from "@chakra-ui/react";import { MusicServiceIndicators } from './musicServices/MusicServiceIndicators';import type { MusicServicesAny } from './musicServices/musicServiceTypes';
export const ArtistCredit = (props: { data: AC, showLinks?: boolean, showMbid?: boolean }) => {
const { data, showLinks = true, showMbid } = props;
if (!showLinks) { return data.name; }
const musicServices: MusicServicesAny[] = []; if(data.mbid) { musicServices.push({name: 'musicbrainz', idHint: 'artist', id: data.mbid}); }
return <Fragment> <HStack> {data.name} <MusicServiceIndicators services={musicServices} showId={showMbid} link={showLinks} /> </HStack> </Fragment>
}
export const ArtistCreditTags = (props: { data: AC[], showLinks?: boolean, showMbid?: boolean }) => ( <HStack> {props.data.map((x, index) => ( <Tag.Root key={index}> <Tag.Label userSelect="all"><ArtistCredit data={x} showLinks={props.showLinks} showMbid={props.showMbid} /></Tag.Label> </Tag.Root> ))} </HStack>)