import React from 'react'; type LoginStatus = 'idle' | 'waiting' | 'success' | 'error'; interface LoginPromptProps { authState: string; errorMessage?: string; onLogin: () => void; onRetry: () => void; loginStatus?: LoginStatus; } export function LoginPrompt({ authState, errorMessage, onLogin, onRetry, loginStatus = 'idle' }: LoginPromptProps) { // Show success state when login completed if (loginStatus === 'success') { return (
You're now connected to iRacing.
Redirecting...
{stateMessage}
) : (Why do I need to log in?
GridPilot needs to access your iRacing account to create and manage hosted sessions on your behalf. This requires authentication with iRacing's website.
A browser window has opened. Please log in to iRacing.
This window will update automatically when login is detected.
A browser window will open for you to log in securely to iRacing. The window will close automatically once login is complete.
)}