import React, { useState } from 'react'; import { useAuth } from '../../context/AuthContext'; import { useNotifications } from '../../context/NotificationContext'; import CryptoLogin from './CryptoLogin'; interface LoginButtonProps { className?: string; } const LoginButton: React.FC = ({ className = '' }) => { const [showLogin, setShowLogin] = useState(false); const { session } = useAuth(); const { addNotification } = useNotifications(); const handleLoginClick = () => { setShowLogin(true); }; const handleLoginSuccess = () => { setShowLogin(false); }; const handleLoginCancel = () => { setShowLogin(false); }; // Don't show login button if user is already authenticated if (session.authed) { return null; } return ( <> {showLogin && (
)} ); }; export default LoginButton;