From 09e4864b321f9232544583f107b60abd15da6c18 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sat, 1 Oct 2022 15:57:47 -0500 Subject: [PATCH] consistent tip amount (M$10) --- common/like.ts | 2 +- web/components/tipper.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/like.ts b/common/like.ts index 38b25dad..7ec14726 100644 --- a/common/like.ts +++ b/common/like.ts @@ -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 diff --git a/web/components/tipper.tsx b/web/components/tipper.tsx index a9c35937..1f6b6e53 100644 --- a/web/components/tipper.tsx +++ b/web/components/tipper.tsx @@ -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 ( addTip(+TIP_SIZE)} + onClick={() => addTip(+LIKE_TIP_AMOUNT)} userTipped={localTip > 0} disabled={!canUp} isCompact