From e7486ae0316a043426d5b501da5447fed2325a16 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 1 Aug 2024 11:20:33 +0700 Subject: [PATCH] format status Signed-off-by: James --- web/screens/Settings/EngineSetting/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/screens/Settings/EngineSetting/index.tsx b/web/screens/Settings/EngineSetting/index.tsx index 2bb91113ad..fbe4171c3f 100644 --- a/web/screens/Settings/EngineSetting/index.tsx +++ b/web/screens/Settings/EngineSetting/index.tsx @@ -13,6 +13,11 @@ import useEngineQuery from '@/hooks/useEngineQuery' import LoadingIndicator from '@/screens/HubScreen2/components/LoadingIndicator' +const getStatusTitle = (status: string) => { + const normalized = status.charAt(0).toUpperCase() + status.slice(1) + return normalized.replaceAll('_', ' ') +} + const EngineSetting: React.FC = () => { const { isLoading, data } = useEngineQuery() @@ -56,7 +61,7 @@ const EngineSetting: React.FC = () => { {engineStatus.version} - {engineStatus.status} + {getStatusTitle(engineStatus.status)} ) })}