From 968fe2d0fac9861a9d7e2b822497fe985b259a6c Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:18:36 +0800 Subject: [PATCH] chore: enhance BoostProgress component with last valid boost information --- apps/renderer/src/modules/boost/boost-progress.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/renderer/src/modules/boost/boost-progress.tsx b/apps/renderer/src/modules/boost/boost-progress.tsx index 9c729da57..9a4af4121 100644 --- a/apps/renderer/src/modules/boost/boost-progress.tsx +++ b/apps/renderer/src/modules/boost/boost-progress.tsx @@ -4,10 +4,15 @@ export const BoostProgress = ({ level, boostCount, remainingBoostsToLevelUp, + lastValidBoost, }: { level: number boostCount: number remainingBoostsToLevelUp: number + lastValidBoost: { + hash: string | null + expiresAt: string + } | null }) => { const percentage = (boostCount / (boostCount + remainingBoostsToLevelUp)) * 100 const nextLevel = level + 1 @@ -41,8 +46,14 @@ export const BoostProgress = ({ Lv. {nextLevel} - {remainingBoostsToLevelUp} more boost will unlock the next level of privilege. + {remainingBoostsToLevelUp} more boost will unlock the next level of benefits! + {lastValidBoost && ( + + You can't add more boost points right now, but feel free to keep boosting. Your current + boost will expire on {new Date(lastValidBoost.expiresAt).toLocaleDateString()}. + + )} ) }