From 7d6a631f5dbed749e0157a24c056edd5f3d50f16 Mon Sep 17 00:00:00 2001 From: Bailey Pumfleet Date: Tue, 25 May 2021 21:34:18 +0100 Subject: [PATCH] Round available hours if necessary --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index e25d40d3..2f8d44dd 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -27,7 +27,7 @@ export default function Home(props) { const stats = [ { name: 'Event Types', stat: props.eventTypeCount }, { name: 'Integrations', stat: props.integrationCount }, - { name: 'Available Hours', stat: (props.user.endTime - props.user.startTime) / 60 + ' hours' }, + { name: 'Available Hours', stat: Math.round(((props.user.endTime - props.user.startTime) / 60) * 100) / 100 + ' hours' }, ]; let timeline = [];