consistent tip amount (M$10)

This commit is contained in:
mantikoros 2022-10-01 15:57:47 -05:00
parent a445d9b7fa
commit 09e4864b32
2 changed files with 5 additions and 6 deletions

View File

@ -5,4 +5,4 @@ export type Like = {
createdTime: number
tipTxnId?: string // only holds most recent tip txn id
}
export const LIKE_TIP_AMOUNT = 5
export const LIKE_TIP_AMOUNT = 10

View File

@ -9,8 +9,7 @@ import { transact } from 'web/lib/firebase/api'
import { track } from 'web/lib/service/analytics'
import { TipButton } from './contract/tip-button'
import { Row } from './layout/row'
const TIP_SIZE = 10
import { LIKE_TIP_AMOUNT } from 'common/like'
export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
const { comment, tips } = prop
@ -77,14 +76,14 @@ export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
return <></>
}
const canUp = me && me.balance >= localTip + TIP_SIZE
const canUp = me && me.balance >= localTip + LIKE_TIP_AMOUNT
return (
<Row className="items-center gap-0.5">
<TipButton
tipAmount={TIP_SIZE}
tipAmount={LIKE_TIP_AMOUNT}
totalTipped={localTip}
onClick={() => addTip(+TIP_SIZE)}
onClick={() => addTip(+LIKE_TIP_AMOUNT)}
userTipped={localTip > 0}
disabled={!canUp}
isCompact