From 1a2b64f157d8d52b8f78d9da8f9b17d8ef5f6ca5 Mon Sep 17 00:00:00 2001 From: Lee Garam Date: Sun, 2 Jun 2024 16:10:03 +0900 Subject: [PATCH] Improved cryptoAssetTile value printing Print "-" (meaning N/A) in case of there is nothing to print(zero values) and aligned the format for better visibility --- frontend/src/routes/user/cryptoAssetTile.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/user/cryptoAssetTile.svelte b/frontend/src/routes/user/cryptoAssetTile.svelte index b63568e..11617d6 100644 --- a/frontend/src/routes/user/cryptoAssetTile.svelte +++ b/frontend/src/routes/user/cryptoAssetTile.svelte @@ -29,15 +29,17 @@ Entry Price - {@html formatCurrency(averageUnitPrice)} + {@html averageUnitPrice !== 0 ? formatCurrency(averageUnitPrice) : '-'} Current Price - {@html formatCurrency(currentPrice)} + {@html currentPrice !== 0 ? formatCurrency(currentPrice) : '-'} Profit - {@html formatCurrency(profit)}
({profitRate}%) + {@html profit !== 0 ? formatCurrency(profit) : '-'}
+ {profitRate !== 0 ? '(' + profitRate.toString() + '%)' : ''} +