From f0346fce4e7ec2604264a14928d2deee88633160 Mon Sep 17 00:00:00 2001 From: Taken Date: Wed, 17 Sep 2025 15:39:30 +0200 Subject: [PATCH] Updated general progress --- .../[ign]/_components/GenericProgress.tsx | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/app/(stats)/player/[ign]/_components/GenericProgress.tsx b/src/app/(stats)/player/[ign]/_components/GenericProgress.tsx index a8a9296..1f5da0d 100644 --- a/src/app/(stats)/player/[ign]/_components/GenericProgress.tsx +++ b/src/app/(stats)/player/[ign]/_components/GenericProgress.tsx @@ -27,12 +27,14 @@ type GenericProgressNoTooltipProps = { export function GenericProgressNoTooltip({ text, percent, className }: GenericProgressNoTooltipProps) { return (
-
= 100 ? "rounded-r-md" : undefined, className)} - style={{ width: `${percent > 100 ? 100 : percent}%` }} - > - {text} -
+ {percent > 0 && ( +
= 100 ? "rounded-r-md" : undefined, className)} + style={{ width: `${percent > 100 ? 100 : percent}%` }} + > + {text} +
+ )} {percent < 100 && (
-
= 100 ? "rounded-r-md" : undefined, className)} - style={{ - width: `${percent > 100 ? 100 : percent}%`, - background: "repeating-linear-gradient(to right,#f55,#fa0,#ff5,#5f5,#5ff,#f5f,#a0a,#f55 16rem)" - }} - > -
+ {percent > 0 && ( +
= 100 ? "rounded-r-md" : undefined, className)} + style={{ + width: `${percent > 100 ? 100 : percent}%`, + background: "repeating-linear-gradient(to right,#f55,#fa0,#ff5,#5f5,#5ff,#f5f,#a0a,#f55 16rem)" + }} + > +
+ )} {percent < 100 && (
-
= 100 ? "rounded-r-md" : undefined, className)} - style={{ width: `${percent > 100 ? 100 : percent}%` }} - > -
+ {percent > 0 && ( +
= 100 ? "rounded-r-md" : undefined, className)} + style={{ width: `${percent > 100 ? 100 : percent}%` }} + > +
+ )} {percent < 100 && (