Increase tip size to M$10

This commit is contained in:
Austin Chen 2022-09-21 18:25:54 -04:00
parent 24766740c5
commit d922900bda

View File

@ -16,6 +16,8 @@ import { track } from 'web/lib/service/analytics'
import { Row } from './layout/row' import { Row } from './layout/row'
import { Tooltip } from './tooltip' import { Tooltip } from './tooltip'
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
@ -82,9 +84,12 @@ export function Tipper(prop: { comment: Comment; tips: CommentTips }) {
const canUp = me && me.id !== comment.userId && me.balance >= localTip + 5 const canUp = me && me.id !== comment.userId && me.balance >= localTip + 5
return ( return (
<Row className="items-center gap-0.5"> <Row className="items-center gap-0.5">
<DownTip onClick={canDown ? () => addTip(-5) : undefined} /> <DownTip onClick={canDown ? () => addTip(-TIP_SIZE) : undefined} />
<span className="font-bold">{Math.floor(total)}</span> <span className="font-bold">{Math.floor(total)}</span>
<UpTip onClick={canUp ? () => addTip(+5) : undefined} value={localTip} /> <UpTip
onClick={canUp ? () => addTip(+TIP_SIZE) : undefined}
value={localTip}
/>
{localTip === 0 ? ( {localTip === 0 ? (
'' ''
) : ( ) : (
@ -107,7 +112,7 @@ function DownTip(props: { onClick?: () => void }) {
<Tooltip <Tooltip
className="h-6 w-6" className="h-6 w-6"
placement="bottom" placement="bottom"
text={onClick && `-${formatMoney(5)}`} text={onClick && `-${formatMoney(TIP_SIZE)}`}
noTap noTap
> >
<button <button
@ -128,7 +133,7 @@ function UpTip(props: { onClick?: () => void; value: number }) {
<Tooltip <Tooltip
className="h-6 w-6" className="h-6 w-6"
placement="bottom" placement="bottom"
text={onClick && `Tip ${formatMoney(5)}`} text={onClick && `Tip ${formatMoney(TIP_SIZE)}`}
noTap noTap
> >
<button <button