From 3ae1da66f9f39535ed37bf8e21ac2a78462501fc Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Wed, 5 Jun 2024 14:49:13 +0300 Subject: [PATCH] (fix) Apply geopattern styles to patient avatar conditionally (#1030) --- .../src/patient-photo/patient-photo.component.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/framework/esm-styleguide/src/patient-photo/patient-photo.component.tsx b/packages/framework/esm-styleguide/src/patient-photo/patient-photo.component.tsx index bf233f195..f05b93dfb 100644 --- a/packages/framework/esm-styleguide/src/patient-photo/patient-photo.component.tsx +++ b/packages/framework/esm-styleguide/src/patient-photo/patient-photo.component.tsx @@ -27,10 +27,14 @@ export function PatientPhoto({ patientUuid, patientName, size }: PatientPhotoPro src={photo?.imageSrc} size={size === 'small' ? '48' : '80'} textSizeRatio={size === 'small' ? 1 : 2} - style={{ - backgroundImage: `url(${patternUrl})`, - backgroundRepeat: 'round', - }} + style={ + !photo + ? { + backgroundImage: `url(${patternUrl})`, + backgroundRepeat: 'round', + } + : undefined + } /> ); }