Skip to content

Commit

Permalink
feat(ui): add trakt external link (#2367)
Browse files Browse the repository at this point in the history
* feat(ui): add trakt external link

* feat(ui): move trakt to end of list of external links

Co-authored-by: Ryan Cohen <ryan@sct.dev>
  • Loading branch information
danshilm and sct committed Jan 9, 2022
1 parent b4b2acd commit 4e56bae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/assets/services/trakt.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/components/ExternalLinkBlock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ImdbLogo from '../../assets/services/imdb.svg';
import PlexLogo from '../../assets/services/plex.svg';
import RTLogo from '../../assets/services/rt.svg';
import TmdbLogo from '../../assets/services/tmdb.svg';
import TraktLogo from '../../assets/services/trakt.svg';
import TvdbLogo from '../../assets/services/tvdb.svg';
import useLocale from '../../hooks/useLocale';

Expand Down Expand Up @@ -78,6 +79,18 @@ const ExternalLinkBlock: React.FC<ExternalLinkBlockProps> = ({
<RTLogo />
</a>
)}
{tmdbId && (
<a
href={`https://trakt.tv/search/tmdb/${tmdbId}?id_type=${
mediaType === 'movie' ? 'movie' : 'show'
}`}
className="w-8 transition duration-300 opacity-50 hover:opacity-100"
target="_blank"
rel="noreferrer"
>
<TraktLogo />
</a>
)}
</div>
);
};
Expand Down

0 comments on commit 4e56bae

Please sign in to comment.