Skip to content

Commit

Permalink
Round to integers on NDC tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluesmile82 committed Dec 15, 2022
1 parent 2e40e5d commit 1875775
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ function CountryEntryTooltipComponent({
}}
/>
<section className={styles.spiInfo}>
<p className={styles.spi}>{landTab ? spiLand : spiMar}</p>
<p className={styles.spi}>
{landTab ? Math.round(spiLand) : Math.round(spiMar)}
</p>
<p className={styles.subtitle}>
{t('National species protection index')}
</p>
Expand All @@ -177,7 +179,7 @@ function CountryEntryTooltipComponent({
</div>
<div className={styles.infoPill}>
<span className={styles.numeric}>
{landTab ? protectionLand : protectionMar}%
{landTab ? Math.round(protectionLand) : Math.round(protectionMar)}%
</span>
<span className={styles.text}>
{landTab
Expand All @@ -187,7 +189,10 @@ function CountryEntryTooltipComponent({
</div>
<div className={styles.infoPill}>
<span className={styles.numeric}>
{landTab ? protectionNeededLand : protectionNeededMar}%
{landTab
? Math.round(protectionNeededLand)
: Math.round(protectionNeededMar)}
%
</span>
<span className={styles.text}>
{landTab
Expand Down

0 comments on commit 1875775

Please sign in to comment.