From ddf7d0eef205b893b0fc940b95e46439fabe853e Mon Sep 17 00:00:00 2001 From: Luciano Marcos Pierdona Junior <64279791+LucianoPierdona@users.noreply.github.com> Date: Wed, 20 Jul 2022 16:44:11 -0300 Subject: [PATCH] Regression: Channel `type` icon on Engagement Dashboard (#26269) Co-authored-by: Tasso Evangelista Co-authored-by: Guilherme Gazzo --- .../channels/ChannelsTab.tsx | 2 +- .../messages/MessagesPerChannelSection.tsx | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx b/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx index 58605505ec1b..577148391d0d 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx +++ b/apps/meteor/ee/client/views/admin/engagementDashboard/channels/ChannelsTab.tsx @@ -84,7 +84,7 @@ const ChannelsTab = (): ReactElement => { {i + 1}. - {(t === 'd' && ) || (t === 'c' && ) || (t === 'p' && )} + {(t === 'd' && ) || (t === 'p' && ) || (t === 'c' && )} {name} diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx b/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx index d24f364a36c4..245fc35940c4 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx +++ b/apps/meteor/ee/client/views/admin/engagementDashboard/messages/MessagesPerChannelSection.tsx @@ -86,15 +86,15 @@ const MessagesPerChannelSection = (): ReactElement => { color: colors.w500, }, { - id: 'c', + id: 'p', label: t('Private_Channels'), - value: pie.c, + value: pie.p, color: colors.s500, }, { - id: 'p', + id: 'c', label: t('Public_Channels'), - value: pie.p, + value: pie.c, color: colors.p500, }, ]} @@ -130,10 +130,9 @@ const MessagesPerChannelSection = (): ReactElement => { }, }, }} - // @ts-ignore - tooltip={({ value }): ReactElement => ( + tooltip={({ datum }): ReactElement => ( - {t('Value_messages', { value })} + {t('Value_messages', { value: datum.value })} )} /> @@ -194,8 +193,8 @@ const MessagesPerChannelSection = (): ReactElement => { {(t === 'd' && ) || - (t === 'c' && ) || - (t === 'p' && )} + (t === 'p' && ) || + (t === 'c' && )} {name}