From 2d88675f42ac7384a3634cf5d2c5dc4634910f04 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Sat, 3 Sep 2022 06:33:33 -0600 Subject: [PATCH] Move & more out of the loop --- web/components/multi-user-transaction-link.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/web/components/multi-user-transaction-link.tsx b/web/components/multi-user-transaction-link.tsx index 70d273db..3f44349f 100644 --- a/web/components/multi-user-transaction-link.tsx +++ b/web/components/multi-user-transaction-link.tsx @@ -32,20 +32,21 @@ export function MultiUserTransactionLink(props: { setOpen(true) }} > - - {userInfos.map((userInfo, index) => - index < maxShowCount ? ( - + + {userInfos.map( + (userInfo, index) => + index < maxShowCount && ( 1} + key={userInfo.username + 'avatar'} /> - - ) : ( - & {userInfos.length - maxShowCount} more - ) + ) + )} + {userInfos.length > maxShowCount && ( + & {userInfos.length - maxShowCount} more )}