From b92bd7a4f0fafb41fe6f3f92a767c33a825903cb Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Tue, 24 Oct 2023 14:20:53 -0300 Subject: [PATCH] chore: adjustments --- .../client/sidebar/footer/SidebarFooterWatermark.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx b/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx index 549b4ca9df39c..e4447dfc4ee7d 100644 --- a/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx +++ b/apps/meteor/ee/client/sidebar/footer/SidebarFooterWatermark.tsx @@ -1,15 +1,15 @@ import { Box, Skeleton } from '@rocket.chat/fuselage'; -import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import React from 'react'; +import { useTranslation } from 'react-i18next'; import { useLicense } from '../../../../client/hooks/useLicense'; export const SidebarFooterWatermark = (): ReactElement | null => { - const t = useTranslation(); + const { t } = useTranslation(); - const { data: { activeModules = [], trial: isTrial = false, tags } = {}, isLoading, isError } = useLicense(); - const [{ name: planName }] = tags ?? [{ name: 'Community' }]; + const { data: { activeModules = [], trial: isTrial = false, tags = [] } = {}, isLoading, isError } = useLicense(); + const planName = tags[0]?.name ?? 'Community'; const isWatermarkHidden = !isTrial && activeModules.includes('hide-watermark'); @@ -24,7 +24,7 @@ export const SidebarFooterWatermark = (): ReactElement | null => { {t('Powered_by_RocketChat')} {isLoading || isError ? ( - + ) : ( {planName} {isTrial ? 'trial' : ''}