Skip to content

Commit

Permalink
format status
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
  • Loading branch information
namchuai committed Aug 1, 2024
1 parent 807b2a3 commit e7486ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/screens/Settings/EngineSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -56,7 +61,7 @@ const EngineSetting: React.FC = () => {
<TableCell className="text-center">
{engineStatus.version}
</TableCell>
<TableCell>{engineStatus.status}</TableCell>
<TableCell>{getStatusTitle(engineStatus.status)}</TableCell>
</TableRow>
)
})}
Expand Down

0 comments on commit e7486ae

Please sign in to comment.