Bläddra i källkod

added a secondActionUser image when there are more than 1 actionUser

kaori 4 år sedan
förälder
incheckning
4550c67732
1 ändrade filer med 9 tillägg och 2 borttagningar
  1. 9 2
      packages/app/src/components/InAppNotification/InAppNotification.tsx

+ 9 - 2
packages/app/src/components/InAppNotification/InAppNotification.tsx

@@ -41,8 +41,15 @@ export const InAppNotification = (props: Props): JSX.Element => {
     if (actionUsers.length < 1) {
       return <></>;
     }
-
-    return <UserPicture user={actionUsers[0]} size="md" noTooltip />;
+    if (actionUsers.length === 1) {
+      return <UserPicture user={actionUsers[0]} size="md" noTooltip />;
+    }
+    return (
+      <>
+        <UserPicture user={actionUsers[0]} size="md" noTooltip />
+        <UserPicture user={actionUsers[1]} size="md" noTooltip />
+      </>
+    );
   };
 
   const componentName = `${notification.targetModel}:${notification.action}`;