mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-19 21:46:50 -04:00
a5c1025efd
(cherry picked from commit 55aaaa5c406a71199152a24f5efb4cf16dbe10fd) Closes #10403
117 lines
2.8 KiB
TypeScript
117 lines
2.8 KiB
TypeScript
import React from 'react';
|
|
import Label from 'Components/Label';
|
|
import Link from 'Components/Link/Link';
|
|
import { kinds, sizes } from 'Helpers/Props';
|
|
import Movie from 'Movie/Movie';
|
|
import translate from 'Utilities/String/translate';
|
|
import styles from './MovieDetailsLinks.css';
|
|
|
|
type MovieDetailsLinksProps = Pick<
|
|
Movie,
|
|
'tmdbId' | 'imdbId' | 'youTubeTrailerId'
|
|
>;
|
|
|
|
function MovieDetailsLinks(props: MovieDetailsLinksProps) {
|
|
const { tmdbId, imdbId, youTubeTrailerId } = props;
|
|
|
|
return (
|
|
<div className={styles.links}>
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://www.themoviedb.org/movie/${tmdbId}`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('TMDb')}
|
|
</Label>
|
|
</Link>
|
|
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://trakt.tv/search/tmdb/${tmdbId}?id_type=movie`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('Trakt')}
|
|
</Label>
|
|
</Link>
|
|
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://letterboxd.com/tmdb/${tmdbId}`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('Letterboxd')}
|
|
</Label>
|
|
</Link>
|
|
|
|
{imdbId ? (
|
|
<>
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://imdb.com/title/${imdbId}/`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('IMDb')}
|
|
</Label>
|
|
</Link>
|
|
|
|
<Link className={styles.link} to={`https://moviechat.org/${imdbId}/`}>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('MovieChat')}
|
|
</Label>
|
|
</Link>
|
|
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://mdblist.com/movie/${imdbId}`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.INFO}
|
|
size={sizes.LARGE}
|
|
>
|
|
MDBList
|
|
</Label>
|
|
</Link>
|
|
</>
|
|
) : null}
|
|
|
|
{youTubeTrailerId ? (
|
|
<Link
|
|
className={styles.link}
|
|
to={`https://www.youtube.com/watch?v=${youTubeTrailerId}`}
|
|
>
|
|
<Label
|
|
className={styles.linkLabel}
|
|
kind={kinds.DANGER}
|
|
size={sizes.LARGE}
|
|
>
|
|
{translate('Trailer')}
|
|
</Label>
|
|
</Link>
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default MovieDetailsLinks;
|