Also strike on payment after short press
This commit is contained in:
parent
d186e869e1
commit
ba04e6522d
@ -11,7 +11,7 @@ import LongPressable from 'react-longpressable'
|
|||||||
import Overlay from 'react-bootstrap/Overlay'
|
import Overlay from 'react-bootstrap/Overlay'
|
||||||
import Popover from 'react-bootstrap/Popover'
|
import Popover from 'react-bootstrap/Popover'
|
||||||
import { useShowModal } from './modal'
|
import { useShowModal } from './modal'
|
||||||
import { LightningConsumer } from './lightning'
|
import { LightningConsumer, useLightning } from './lightning'
|
||||||
import { isInsufficientFundsError } from '../lib/anonymous'
|
import { isInsufficientFundsError } from '../lib/anonymous'
|
||||||
|
|
||||||
const getColor = (meSats) => {
|
const getColor = (meSats) => {
|
||||||
@ -71,6 +71,7 @@ export default function UpVote ({ item, className, pendingSats, setPendingSats }
|
|||||||
const ref = useRef()
|
const ref = useRef()
|
||||||
const timerRef = useRef(null)
|
const timerRef = useRef(null)
|
||||||
const me = useMe()
|
const me = useMe()
|
||||||
|
const strike = useLightning()
|
||||||
const [setWalkthrough] = useMutation(
|
const [setWalkthrough] = useMutation(
|
||||||
gql`
|
gql`
|
||||||
mutation setWalkthrough($upvotePopover: Boolean, $tipPopover: Boolean) {
|
mutation setWalkthrough($upvotePopover: Boolean, $tipPopover: Boolean) {
|
||||||
@ -184,6 +185,7 @@ export default function UpVote ({ item, className, pendingSats, setPendingSats }
|
|||||||
amount={pendingSats}
|
amount={pendingSats}
|
||||||
onPayment={async (_, invoiceHash) => {
|
onPayment={async (_, invoiceHash) => {
|
||||||
await act({ variables: { ...variables, invoiceHash } })
|
await act({ variables: { ...variables, invoiceHash } })
|
||||||
|
strike()
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user