import PlexIcon from '@app/assets/services/plex.svg'; import usePlexLogin from '@app/hooks/usePlexLogin'; import defineMessages from '@app/utils/defineMessages'; import { FormattedMessage } from 'react-intl'; import LoginButton from './LoginButton'; const messages = defineMessages('components.Login', { loginwithapp: 'Login with {appName}', }); interface PlexLoginButtonProps { onAuthToken: (authToken: string) => void; isProcessing?: boolean; onError?: (message: string) => void; large?: boolean; } const PlexLoginButton = ({ onAuthToken, onError, isProcessing, large, }: PlexLoginButtonProps) => { const { loading, login } = usePlexLogin({ onAuthToken, onError }); return ( {large ? ( , }} > {(chunks) => ( <> {chunks.map((c) => typeof c === 'string' ? {c} : c )} )} ) : ( )} ); }; export default PlexLoginButton;