From 43b06ae6fad6f01b6a9822c63f420b4920b8487a Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 11 Oct 2022 13:30:24 -0500 Subject: [PATCH] tip button: show number of tips --- web/components/contract/tip-button.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/components/contract/tip-button.tsx b/web/components/contract/tip-button.tsx index 61a74e74..c34f88ff 100644 --- a/web/components/contract/tip-button.tsx +++ b/web/components/contract/tip-button.tsx @@ -17,9 +17,15 @@ export function TipButton(props: { const { tipAmount, totalTipped, userTipped, isCompact, onClick, disabled } = props + const tipDisplay = shortFormatNumber(Math.ceil(totalTipped / 10)) + return ( 99 + tipDisplay.length > 2 ? 'text-[0.4rem] sm:text-[0.5rem]' : 'sm:text-2xs text-[0.5rem]' )} > - {shortFormatNumber(totalTipped)} + {tipDisplay} )}