improve tipping walkthrough: don't display if user doesn't have sats, more generic error message
This commit is contained in:
parent
f35d714c70
commit
f241f14379
|
@ -36,7 +36,7 @@ export function FundErrorModal () {
|
|||
>
|
||||
<div className='modal-close' onClick={() => setError(false)}>X</div>
|
||||
<Modal.Body>
|
||||
<p className='font-weight-bolder'>you have no sats</p>
|
||||
<p className='font-weight-bolder'>you need more sats</p>
|
||||
<div className='d-flex justify-content-end'>
|
||||
<Link href='/wallet?type=fund'>
|
||||
<Button variant='success' onClick={() => setError(false)}>fund</Button>
|
||||
|
|
|
@ -76,12 +76,13 @@ export default function UpVote ({ item, className }) {
|
|||
const setVoteShow = (yes) => {
|
||||
if (!me) return
|
||||
|
||||
if (yes && !me.upvotePopover) {
|
||||
_setVoteShow(yes)
|
||||
// if they haven't seen the walkthrough and they have sats
|
||||
if (yes && !me.upvotePopover && me.sats) {
|
||||
_setVoteShow(true)
|
||||
}
|
||||
|
||||
if (voteShow && !yes) {
|
||||
_setVoteShow(yes)
|
||||
_setVoteShow(false)
|
||||
setWalkthrough({ variables: { upvotePopover: true } })
|
||||
}
|
||||
}
|
||||
|
@ -90,13 +91,13 @@ export default function UpVote ({ item, className }) {
|
|||
if (!me) return
|
||||
|
||||
// if we want to show it, yet we still haven't shown
|
||||
if (yes && !me.tipPopover) {
|
||||
_setTipShow(yes)
|
||||
if (yes && !me.tipPopover && me.sats) {
|
||||
_setTipShow(true)
|
||||
}
|
||||
|
||||
// if it's currently showing and we want to hide it
|
||||
if (tipShow && !yes) {
|
||||
_setTipShow(yes)
|
||||
_setTipShow(false)
|
||||
setWalkthrough({ variables: { tipPopover: true } })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue