Skip to content

Commit

Permalink
fix: pass proof param to useCredentialCardStyles hook
Browse files Browse the repository at this point in the history
Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos committed Jan 24, 2025
1 parent 5fa8de5 commit 7570443
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const CredentialCard11: React.FC<CredentialCard11Props> = ({
])
const [helpAction, setHelpAction] = useState<GenericFn>()
const [overlay, setOverlay] = useState<CredentialOverlay<BrandingOverlay>>({})
const { styles, borderRadius, logoHeight } = useCredentialCardStyles(overlay, brandingOverlayType)
const { styles, borderRadius, logoHeight } = useCredentialCardStyles(overlay, brandingOverlayType, proof)
const attributeFormats: Record<string, string | undefined> = useMemo(() => {
return (overlay.bundle as any)?.bundle.attributes
.map((attr: any) => {
Expand Down Expand Up @@ -399,6 +399,7 @@ const CredentialCard11: React.FC<CredentialCard11Props> = ({
overlay={overlay}
overlayType={brandingOverlayType}
elevated={elevated}
proof={proof}
hasBody={!(overlay.metaOverlay?.issuer === 'Unknown Contact' && proof)}
/>
)}
Expand Down Expand Up @@ -453,6 +454,7 @@ const CredentialCard11: React.FC<CredentialCard11Props> = ({
overlay={overlay}
overlayType={brandingOverlayType}
elevated={elevated}
proof={proof}
hasBody={!(overlay.metaOverlay?.issuer === 'Unknown Contact' && proof)}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ interface Props {
overlayType: BrandingOverlayType
hasBody: boolean
elevated?: boolean
proof?: boolean
}

const CredentialIssuerBody: React.FC<Props> = ({ overlay, overlayType, elevated, hasBody }: Props) => {
const CredentialIssuerBody: React.FC<Props> = ({ overlay, overlayType, elevated, hasBody, proof }: Props) => {
const isBranding10 = overlayType === BrandingOverlayType.Branding10
const { TextTheme } = useTheme()
const { styles } = useCredentialCardStyles(overlay, overlayType)
const { styles } = useCredentialCardStyles(overlay, overlayType, proof)
const { t } = useTranslation()
if (!hasBody) return
return (
Expand Down

0 comments on commit 7570443

Please sign in to comment.