mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-16 08:24:16 +02:00
add links and additional data to metadata section
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
import { Fragment } from 'react';
|
||||
import { Fragment, memo } from 'react';
|
||||
import { generatePath, Link } from 'react-router';
|
||||
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { Text, TextProps } from '/@/shared/components/text/text';
|
||||
import { AlbumArtist, RelatedAlbumArtist, RelatedArtist } from '/@/shared/types/domain-types';
|
||||
|
||||
export const JOINED_ARTISTS_MUTED_PROPS = {
|
||||
linkProps: { fw: 400, isMuted: true },
|
||||
rootTextProps: { fw: 400, isMuted: true, size: 'sm' as const },
|
||||
} as const;
|
||||
|
||||
interface JoinedArtistsProps {
|
||||
artistName: string;
|
||||
artists: AlbumArtist[] | RelatedAlbumArtist[] | RelatedArtist[];
|
||||
@@ -12,7 +17,7 @@ interface JoinedArtistsProps {
|
||||
rootTextProps?: Partial<Omit<TextProps, 'children' | 'component'>>;
|
||||
}
|
||||
|
||||
export const JoinedArtists = ({
|
||||
const JoinedArtistsComponent = ({
|
||||
artistName,
|
||||
artists,
|
||||
linkProps,
|
||||
@@ -205,6 +210,8 @@ export const JoinedArtists = ({
|
||||
);
|
||||
};
|
||||
|
||||
export const JoinedArtists = memo(JoinedArtistsComponent);
|
||||
|
||||
function escapeRegex(str: string): string {
|
||||
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user