Skip to content

Commit 8966568

Browse files
authored
feat: certificate human readable (#11533)
1 parent ce2b567 commit 8966568

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/developer-portal/src/components/apps/pipeline/dns/dns-step-three.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ import { cx } from '@linaria/core'
2020
import { DnsContainerElement, DnsContainerRow, DnsInputElement, DnsValue } from './__styles__'
2121
import { useAppState } from '../../state/use-app-state'
2222

23+
const humanReadable = (s?: string): string => {
24+
if (!s) return ''
25+
26+
const value = s.split('_').join(' ').toLowerCase()
27+
28+
return [value.charAt(0).toUpperCase(), value.slice(1, value.length)].join('')
29+
}
30+
2331
export const PipelineDnsStepThree: FC<{
2432
verifyDnsName: string
2533
verifyDnsValue: string
@@ -75,7 +83,7 @@ export const PipelineDnsStepThree: FC<{
7583
: 'default'
7684
}
7785
/>
78-
{certificate?.Status}
86+
{humanReadable(certificate?.Status)}
7987
</div>
8088
{loading ? (
8189
<Loader />
@@ -108,7 +116,7 @@ export const PipelineDnsStepThree: FC<{
108116
</DnsInputElement>
109117
<DnsInputElement>
110118
<Label>Status</Label>
111-
<DnsValue>{domain?.ValidationStatus}</DnsValue>
119+
<DnsValue>{humanReadable(domain?.ValidationStatus)}</DnsValue>
112120
</DnsInputElement>
113121
</DnsContainerRow>
114122
))}

0 commit comments

Comments
 (0)