From 62b1bfcd891f74acc52e2f31d414837a71526e75 Mon Sep 17 00:00:00 2001 From: 0xsysr3ll <0xsysr3ll@pm.me> Date: Mon, 21 Apr 2025 16:57:04 +0200 Subject: [PATCH] fix: improve Plex profile selector with Next.js Image and safer null checks --- src/components/Login/PlexProfileSelector.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/Login/PlexProfileSelector.tsx b/src/components/Login/PlexProfileSelector.tsx index 62643ca2..8ab1bbeb 100644 --- a/src/components/Login/PlexProfileSelector.tsx +++ b/src/components/Login/PlexProfileSelector.tsx @@ -3,6 +3,7 @@ import PlexPinEntry from '@app/components/Login/PlexPinEntry'; import defineMessages from '@app/utils/defineMessages'; import { LockClosedIcon } from '@heroicons/react/24/solid'; import type { PlexProfile } from '@server/api/plextv'; +import Image from 'next/image'; import { useState } from 'react'; import { useIntl } from 'react-intl'; @@ -69,10 +70,10 @@ const PlexProfileSelector = ({ setPinError(null); }; - if (showPinEntry && selectedProfile) { + if (showPinEntry && selectedProfile && selectedProfileId) { return ( -
- + {profile.title