fix: externalLinkBlock

This commit is contained in:
Jesse Boswell
2023-06-05 12:10:25 -05:00
parent 672061cd64
commit 46cd4d01d9

View File

@@ -10,6 +10,7 @@ import useLocale from '@app/hooks/useLocale';
import useSettings from '@app/hooks/useSettings'; import useSettings from '@app/hooks/useSettings';
import { MediaType } from '@server/constants/media'; import { MediaType } from '@server/constants/media';
import { MediaServerType } from '@server/constants/server'; import { MediaServerType } from '@server/constants/server';
import getConfig from 'next/config';
interface ExternalLinkBlockProps { interface ExternalLinkBlockProps {
mediaType: 'movie' | 'tv'; mediaType: 'movie' | 'tv';
@@ -29,6 +30,7 @@ const ExternalLinkBlock = ({
mediaUrl, mediaUrl,
}: ExternalLinkBlockProps) => { }: ExternalLinkBlockProps) => {
const settings = useSettings(); const settings = useSettings();
const { publicRuntimeConfig } = getConfig();
const { locale } = useLocale(); const { locale } = useLocale();
return ( return (
@@ -42,11 +44,10 @@ const ExternalLinkBlock = ({
> >
{settings.currentSettings.mediaServerType === MediaServerType.PLEX ? ( {settings.currentSettings.mediaServerType === MediaServerType.PLEX ? (
<PlexLogo /> <PlexLogo />
) : settings.currentSettings.mediaServerType === ) : publicRuntimeConfig.JELLYFIN_TYPE == 'emby' ? (
MediaServerType.JELLYFIN ? (
<JellyfinLogo />
) : (
<EmbyLogo /> <EmbyLogo />
) : (
<JellyfinLogo />
)} )}
</a> </a>
)} )}