diff --git a/src/components/Login/PlexPinEntry.tsx b/src/components/Login/PlexPinEntry.tsx index 57ac08ca..7bd9863d 100644 --- a/src/components/Login/PlexPinEntry.tsx +++ b/src/components/Login/PlexPinEntry.tsx @@ -1,7 +1,7 @@ import Button from '@app/components/Common/Button'; import defineMessages from '@app/utils/defineMessages'; import { ApiErrorCode } from '@server/constants/error'; -import { useEffect, useState } from 'react'; +import { useState } from 'react'; import { useIntl } from 'react-intl'; const messages = defineMessages('components.Login.PlexPinEntry', { @@ -26,26 +26,15 @@ const PlexPinEntry = ({ profileName, onSubmit, onCancel, - error: externalError, }: PlexPinEntryProps) => { const intl = useIntl(); const [pin, setPin] = useState(''); const [isSubmitting, setIsSubmitting] = useState(false); - const [internalError, setInternalError] = useState(null); - - const displayError = externalError || internalError; - - useEffect(() => { - if (externalError) { - setInternalError(null); - } - }, [externalError]); const handleSubmit = async () => { if (!pin || isSubmitting) return; setIsSubmitting(true); - setInternalError(null); try { await onSubmit(pin); @@ -72,8 +61,6 @@ const PlexPinEntry = ({ intl.formatMessage(messages.invalidPin); } } - - setInternalError(msg); } finally { setIsSubmitting(false); } @@ -95,16 +82,6 @@ const PlexPinEntry = ({ {profileName}

- {displayError && ( -
- {displayError} -
- )} -