diff --git a/webapp/channels/src/components/admin_console/admin_sidebar_header/admin_sidebar_header.tsx b/webapp/channels/src/components/admin_console/admin_sidebar_header/admin_sidebar_header.tsx
index 43c984207b..8ae6d13a75 100644
--- a/webapp/channels/src/components/admin_console/admin_sidebar_header/admin_sidebar_header.tsx
+++ b/webapp/channels/src/components/admin_console/admin_sidebar_header/admin_sidebar_header.tsx
@@ -1,8 +1,8 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
-import React from 'react';
-import {FormattedMessage} from 'react-intl';
+import React, {memo} from 'react';
+import {FormattedMessage, useIntl} from 'react-intl';
import type {UserProfile} from '@mattermost/types/users';
@@ -13,54 +13,52 @@ import MenuIcon from 'components/widgets/icons/menu_icon';
import MenuWrapper from 'components/widgets/menu/menu_wrapper';
import Avatar from 'components/widgets/users/avatar';
-import * as Utils from 'utils/utils';
-
type Props = {
currentUser: UserProfile;
}
-export default class SidebarHeader extends React.PureComponent
{
- public render() {
- const me = this.props.currentUser;
- let profilePicture = null;
+const SidebarHeader = ({currentUser: me}: Props) => {
+ const intl = useIntl();
+ let profilePicture = null;
- if (!me) {
- return null;
- }
+ if (!me) {
+ return null;
+ }
- if (me.last_picture_update) {
- profilePicture = (
-
- );
- }
-
- return (
-
-
- {profilePicture}
-
-
-
-
-
{'@' + me.username}
-
-
-
-
-
+ if (me.last_picture_update) {
+ profilePicture = (
+
);
}
-}
+
+ return (
+
+
+ {profilePicture}
+
+
+
+
+
{'@' + me.username}
+
+
+
+
+
+ );
+};
+
+export default memo(SidebarHeader);