remove window flow

This commit is contained in:
keyan 2021-12-10 14:10:59 -06:00
parent 4d3ab603da
commit 540368e2a6

View File

@ -6,7 +6,6 @@ import { signIn } from 'next-auth/client'
import { useFundError } from './fund-error' import { useFundError } from './fund-error'
import ActionTooltip from './action-tooltip' import ActionTooltip from './action-tooltip'
import { useItemAct } from './item-act' import { useItemAct } from './item-act'
import Window from '../svgs/window-2-fill.svg'
import { useMe } from './me' import { useMe } from './me'
import { useRef, useState } from 'react' import { useRef, useState } from 'react'
import LongPressable from 'react-longpressable' import LongPressable from 'react-longpressable'
@ -174,10 +173,8 @@ export default function UpVote ({ item, className }) {
if (me?.tipDefault) { if (me?.tipDefault) {
return `${me.tipDefault} sat${me.tipDefault > 1 ? 's' : ''}` return `${me.tipDefault} sat${me.tipDefault > 1 ? 's' : ''}`
} }
return <Window style={{ fill: '#fff' }} width={18} height={18} /> return '1 sat'
} }
return '1 sat'
} }
const noSelfTips = item?.meVote && item?.mine const noSelfTips = item?.meVote && item?.mine
@ -218,16 +215,12 @@ export default function UpVote ({ item, className }) {
if (item?.meVote) { if (item?.meVote) {
setVoteShow(false) setVoteShow(false)
if (me?.tipDefault) { try {
try { strike()
strike() await act({ variables: { id: item.id, act: 'TIP', sats: me.tipDefault || 1 } })
await act({ variables: { id: item.id, act: 'TIP', sats: me.tipDefault } }) } catch (e) {
} catch (e) { console.log(e)
console.log(e)
}
return
} }
setItem({ itemId: item.id, act, strike })
return return
} }