consistent tip amount (M$10)
This commit is contained in:
parent
a445d9b7fa
commit
09e4864b32
|
@ -5,4 +5,4 @@ export type Like = {
|
||||||
createdTime: number
|
createdTime: number
|
||||||
tipTxnId?: string // only holds most recent tip txn id
|
tipTxnId?: string // only holds most recent tip txn id
|
||||||
}
|
}
|
||||||
export const LIKE_TIP_AMOUNT = 5
|
export const LIKE_TIP_AMOUNT = 10
|
||||||
|
|
|
@ -9,8 +9,7 @@ import { transact } from 'web/lib/firebase/api'
|
||||||
import { track } from 'web/lib/service/analytics'
|
import { track } from 'web/lib/service/analytics'
|
||||||
import { TipButton } from './contract/tip-button'
|
import { TipButton } from './contract/tip-button'
|
||||||
import { Row } from './layout/row'
|
import { Row } from './layout/row'
|
||||||
|
import { LIKE_TIP_AMOUNT } from 'common/like'
|
||||||
const TIP_SIZE = 10
|
|
||||||
|
|
||||||
export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
|
export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
|
||||||
const { comment, tips } = prop
|
const { comment, tips } = prop
|
||||||
|
@ -77,14 +76,14 @@ export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|
||||||
const canUp = me && me.balance >= localTip + TIP_SIZE
|
const canUp = me && me.balance >= localTip + LIKE_TIP_AMOUNT
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row className="items-center gap-0.5">
|
<Row className="items-center gap-0.5">
|
||||||
<TipButton
|
<TipButton
|
||||||
tipAmount={TIP_SIZE}
|
tipAmount={LIKE_TIP_AMOUNT}
|
||||||
totalTipped={localTip}
|
totalTipped={localTip}
|
||||||
onClick={() => addTip(+TIP_SIZE)}
|
onClick={() => addTip(+LIKE_TIP_AMOUNT)}
|
||||||
userTipped={localTip > 0}
|
userTipped={localTip > 0}
|
||||||
disabled={!canUp}
|
disabled={!canUp}
|
||||||
isCompact
|
isCompact
|
||||||
|
|
Loading…
Reference in New Issue
Block a user