From e9d9a475d96ca539e32a956fbe18f4f85f9f5a45 Mon Sep 17 00:00:00 2001 From: Duc Le Date: Tue, 19 Nov 2024 19:08:46 +0000 Subject: [PATCH] Prettier code --- app/components/Block.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/Block.tsx b/app/components/Block.tsx index e60ebc7..6adcbeb 100644 --- a/app/components/Block.tsx +++ b/app/components/Block.tsx @@ -6,14 +6,14 @@ const grafana_stub = "https://shadow.nd.rl.ac.uk/grafana/d/wMlwwaHMk/block-history?viewPanel=2&orgId=1&var-block="; function numberFormatter(value: string | number | undefined) { - var nValue: number = value == undefined ? NaN : +value + var nValue: number = value == undefined ? NaN : +value; if (isNaN(nValue)) { - return value + return value; } else { if (nValue != 0 && (Math.abs(nValue) < 0.001 || Math.abs(nValue) > 10000)) { - return nValue.toExponential() + return nValue.toExponential(); } else { - return nValue.toPrecision() + return nValue.toPrecision(); } } }