diff --git a/.changeset/wet-wombats-perform.md b/.changeset/wet-wombats-perform.md new file mode 100644 index 000000000..a99a81f0b --- /dev/null +++ b/.changeset/wet-wombats-perform.md @@ -0,0 +1,5 @@ +--- +'@blockchain-lab-um/dapp': patch +--- + +Fixed minor visual bugs diff --git a/packages/dapp/src/app/[locale]/app/(public)/share-presentation/[id]/credentialPanel.tsx b/packages/dapp/src/app/[locale]/app/(public)/share-presentation/[id]/credentialPanel.tsx index b7055dbd4..0230ccd64 100644 --- a/packages/dapp/src/app/[locale]/app/(public)/share-presentation/[id]/credentialPanel.tsx +++ b/packages/dapp/src/app/[locale]/app/(public)/share-presentation/[id]/credentialPanel.tsx @@ -14,6 +14,7 @@ import { useTranslations } from 'next-intl'; import { DIDDisplay } from '@/components/DIDDisplay'; import JsonModal from '@/components/JsonModal'; +import { getFirstWord } from '@/utils/format'; import { convertTypes, copyToClipboard } from '@/utils/string'; interface FormatedPanelProps { @@ -158,7 +159,7 @@ const CredentialPanel = ({ credential }: FormatedPanelProps) => { className="border-navy-blue-300 bg-navy-blue-100 text-navy-blue-700" >

- {types} + {getFirstWord(types)}

diff --git a/packages/dapp/src/components/CredentialDisplay/FormatedPanel.tsx b/packages/dapp/src/components/CredentialDisplay/FormatedPanel.tsx index 209e8ec5b..22092f62d 100644 --- a/packages/dapp/src/components/CredentialDisplay/FormatedPanel.tsx +++ b/packages/dapp/src/components/CredentialDisplay/FormatedPanel.tsx @@ -14,7 +14,12 @@ import { useTranslations } from 'next-intl'; import { DIDDisplay } from '@/components/DIDDisplay'; import JsonModal from '@/components/JsonModal'; -import { convertTypes, copyToClipboard } from '@/utils/string'; +import { getFirstWord } from '@/utils/format'; +import { + camelToTitleCase, + convertTypes, + copyToClipboard, +} from '@/utils/string'; interface FormatedPanelProps { credential: VerifiableCredential; @@ -87,7 +92,7 @@ const CredentialSubject = ({ )} >

- {key}: + {camelToTitleCase(key)}:

{isObject ? ( @@ -137,7 +142,7 @@ const FormatedPanel = ({ credential }: FormatedPanelProps) => { className="border-navy-blue-300 bg-navy-blue-100 text-navy-blue-700" >

- {types} + {getFirstWord(types)}

@@ -174,9 +179,6 @@ const FormatedPanel = ({ credential }: FormatedPanelProps) => { {t('issuer')}
-

- DID: -

; } -const JsonPanel = ({ data }: JsonPanelProps) => { - const pathname = usePathname(); - const router = useRouter(); - - return ( - <> +const JsonPanel = ({ data }: JsonPanelProps) => ( + <> +
+