import { useEffect, useState } from 'react' import { getAlbyService } from '@/lib/alby' interface AlbyInstallerProps { onInstalled?: () => void } export function AlbyInstaller({ onInstalled }: AlbyInstallerProps) { const [isInstalled, setIsInstalled] = useState(false) const [isChecking, setIsChecking] = useState(true) useEffect(() => { const checkAlby = async () => { try { const alby = getAlbyService() const installed = alby.isEnabled() setIsInstalled(installed) if (installed) { onInstalled?.() } } catch (e) { console.error('Error checking Alby:', e) setIsInstalled(false) } finally { setIsChecking(false) } } checkAlby() }, [onInstalled]) if (isChecking) { return null } if (isInstalled) { return null } return (

Alby Extension Required

To make Lightning payments, please install the Alby browser extension.

Install Alby

Alby is a Lightning wallet that enables instant Bitcoin payments in your browser.

) }