mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): include language parameter in TMDb links (#1344)
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
import React from 'react';
|
import React, { useContext } from 'react';
|
||||||
|
import { MediaType } from '../../../server/constants/media';
|
||||||
|
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 TmdbLogo from '../../assets/services/tmdb.svg';
|
||||||
import TvdbLogo from '../../assets/services/tvdb.svg';
|
import TvdbLogo from '../../assets/services/tvdb.svg';
|
||||||
import ImdbLogo from '../../assets/services/imdb.svg';
|
import { LanguageContext } from '../../context/LanguageContext';
|
||||||
import RTLogo from '../../assets/services/rt.svg';
|
|
||||||
import PlexLogo from '../../assets/services/plex.svg';
|
|
||||||
import { MediaType } from '../../../server/constants/media';
|
|
||||||
|
|
||||||
interface ExternalLinkBlockProps {
|
interface ExternalLinkBlockProps {
|
||||||
mediaType: 'movie' | 'tv';
|
mediaType: 'movie' | 'tv';
|
||||||
@@ -23,6 +24,8 @@ const ExternalLinkBlock: React.FC<ExternalLinkBlockProps> = ({
|
|||||||
rtUrl,
|
rtUrl,
|
||||||
plexUrl,
|
plexUrl,
|
||||||
}) => {
|
}) => {
|
||||||
|
const { locale } = useContext(LanguageContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center w-full space-x-5">
|
<div className="flex items-center justify-center w-full space-x-5">
|
||||||
{plexUrl && (
|
{plexUrl && (
|
||||||
@@ -37,7 +40,7 @@ const ExternalLinkBlock: React.FC<ExternalLinkBlockProps> = ({
|
|||||||
)}
|
)}
|
||||||
{tmdbId && (
|
{tmdbId && (
|
||||||
<a
|
<a
|
||||||
href={`https://www.themoviedb.org/${mediaType}/${tmdbId}`}
|
href={`https://www.themoviedb.org/${mediaType}/${tmdbId}?language=${locale}`}
|
||||||
className="w-8 transition duration-300 opacity-50 hover:opacity-100"
|
className="w-8 transition duration-300 opacity-50 hover:opacity-100"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
|
Reference in New Issue
Block a user