From e2b5a86ca80b7a2af03140536145ad9dc0a5f8f4 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Sun, 13 Mar 2022 18:49:22 +0700 Subject: [PATCH] Reverse rank percentile --- src/routes/wish/_rank.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/wish/_rank.svelte b/src/routes/wish/_rank.svelte index 8bd866b5..c2e8fa61 100644 --- a/src/routes/wish/_rank.svelte +++ b/src/routes/wish/_rank.svelte @@ -59,7 +59,7 @@ if (qty >= value) break; } - percentage = (totalLower / total) * 100; + percentage = 100 - (totalLower / total) * 100; console.log(totalLower, percentage, value); loading = false; @@ -86,7 +86,7 @@
TOP - {loading ? '...' : percentage.toFixed(0)}% + {loading ? '...' : percentage.toFixed(percentage < 2 ? 1 : 0)}%

{$t('wish.rank.level')}