2021-05-20 21:32:59 +00:00
|
|
|
import Link from 'next/link'
|
2023-07-24 18:35:05 +00:00
|
|
|
import Button from 'react-bootstrap/Button'
|
2023-07-20 22:34:39 +00:00
|
|
|
import { useAnonymous } from '../lib/anonymous'
|
2021-05-20 21:32:59 +00:00
|
|
|
|
2023-07-20 22:34:39 +00:00
|
|
|
export default function FundError ({ onClose, amount, onPayment }) {
|
|
|
|
const anonPayment = useAnonymous(onPayment, { forceInvoice: true })
|
2021-05-20 21:32:59 +00:00
|
|
|
return (
|
2023-01-10 23:13:37 +00:00
|
|
|
<>
|
2023-07-24 18:35:05 +00:00
|
|
|
<p className='fw-bolder'>you need more sats</p>
|
2023-01-10 23:13:37 +00:00
|
|
|
<div className='d-flex justify-content-end'>
|
|
|
|
<Link href='/wallet?type=fund'>
|
2023-07-20 22:34:39 +00:00
|
|
|
<Button variant='success' onClick={onClose}>fund wallet</Button>
|
2023-01-10 23:13:37 +00:00
|
|
|
</Link>
|
2023-07-20 22:34:39 +00:00
|
|
|
<span className='d-flex mx-3 font-weight-bold text-muted align-items-center'>or</span>
|
|
|
|
<Button variant='success' onClick={() => anonPayment(amount)}>pay invoice</Button>
|
2023-01-10 23:13:37 +00:00
|
|
|
</div>
|
|
|
|
</>
|
2021-05-20 21:32:59 +00:00
|
|
|
)
|
|
|
|
}
|