1- import { parseDuration } from '@douglasneuroinformatics/libjs' ;
21import { Card , Heading } from '@douglasneuroinformatics/libui/components' ;
32import { useTranslation } from '@douglasneuroinformatics/libui/hooks' ;
43import type { ReleaseInfo } from '@opendatacapture/schemas/setup' ;
@@ -64,12 +63,6 @@ export const AboutPage = () => {
6463
6564 const { isGatewayEnabled } = setupStateQuery . data ;
6665
67- const translateUptime = ( uptime : number ) => {
68- let { days, hours, minutes, seconds } = parseDuration ( uptime * 1000 ) ;
69- hours += days * 24 ;
70- return [ hours , minutes , seconds ] . map ( ( value ) => ( value < 10 ? '0' + value : value ) ) . join ( ':' ) ;
71- } ;
72-
7366 const translateReleaseInfo = ( release : ReleaseInfo ) => {
7467 const translatedReleaseInfo = {
7568 [ t ( translations . buildType ) ] : t ( translations . buildTypes [ release . type ] ) ,
@@ -92,7 +85,7 @@ export const AboutPage = () => {
9285 gatewayInfo [ t ( translations . status ) ] = gatewayHealthData . status . toString ( ) ;
9386 if ( gatewayHealthData . ok ) {
9487 Object . assign ( gatewayInfo , translateReleaseInfo ( gatewayHealthData . release ) , {
95- [ t ( translations . uptime ) ] : translateUptime ( gatewayHealthData . uptime )
88+ [ t ( translations . uptime ) ] : `Uptime= ${ gatewayHealthData . uptime } `
9689 } ) ;
9790 }
9891 return gatewayInfo ;
@@ -127,7 +120,7 @@ export const AboutPage = () => {
127120 < InfoBlock
128121 items = { {
129122 ...translateReleaseInfo ( setupStateQuery . data . release ) ,
130- [ t ( translations . uptime ) ] : translateUptime ( setupStateQuery . data . uptime )
123+ [ t ( translations . uptime ) ] : `Uptime= ${ setupStateQuery . data . uptime } `
131124 } }
132125 label = { t ( {
133126 en : 'Core API' ,
0 commit comments