From a09c040a12b20af62340d6596710b2e6951a5379 Mon Sep 17 00:00:00 2001 From: Thomas Brq <71637888+thomasbrq@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:55:22 +0100 Subject: [PATCH] [GH-25595] Convert ./components/admin_console/group_settings/group_details/group_users_row.tsx from Class Component to Function Component (#25607) * Convert Class component to Function component * Fix style * Applied the requested changes * Updated the snapshot. --- .../__snapshots__/group_users.test.tsx.snap | 230 +++++++++--------- .../group_details/group_users_row.tsx | 74 +++--- 2 files changed, 155 insertions(+), 149 deletions(-) diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap index c7fdaa5c27..258b77e56d 100644 --- a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_users.test.tsx.snap @@ -27,7 +27,7 @@ exports[`components/admin_console/group_settings/group_details/GroupUsers should className="fa fa-spinner fa-pulse fa-2x" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { - render = () => { - return ( -
- -
-
- - {'@' + this.props.username} - - {'-'} - - {this.props.displayName} - -
-
- - - - {this.props.email} -
+const GroupUsersRow = ({ + username, + displayName, + email, + userId, + lastPictureUpdate, +}: Props) => { + return ( +
+ +
+
+ + {'@' + username} + + {'-'} + + {displayName} + +
+
+ + + + {email}
- ); - }; -} +
+ ); +}; + +export default React.memo(GroupUsersRow);