From 42419dabdc40a874beec81028da4bc05be2918c8 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Wed, 31 Mar 2021 05:02:42 +0800 Subject: [PATCH] Adjust mobile layout on wish tally --- src/routes/wish/tally/_item.svelte | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/routes/wish/tally/_item.svelte b/src/routes/wish/tally/_item.svelte index e1e8b118..d429b490 100644 --- a/src/routes/wish/tally/_item.svelte +++ b/src/routes/wish/tally/_item.svelte @@ -20,6 +20,11 @@ minimumFractionDigits: 0, }); + const numberFormatSecondary = Intl.NumberFormat('en', { + maximumFractionDigits: 1, + minimumFractionDigits: 0, + }); + // prettier-ignore const legendaryMapping = { character: [ @@ -319,26 +324,26 @@ {numberFormat.format(legendary.percentage)}%

-

- - - - - +

+ + + + +

Total {numberFormat.format(legendary.total)}

- {numberFormat.format(rare.percentage)}% + {numberFormatSecondary.format(rare.percentage)}%

-

- - - - +

+ + + +

Total {numberFormat.format(rare.total)}