Skip to content

Commit

Permalink
undo administration badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 25, 2023
1 parent f949339 commit 7274603
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 103 deletions.
14 changes: 2 additions & 12 deletions apps/meteor/client/sidebar/header/actions/Administration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@ import type { HTMLAttributes, VFC } from 'react';
import React from 'react';

import GenericMenu from '../../../components/GenericMenu/GenericMenu';
import { useAdministrationHighlight } from './hooks/useAdministrationHighlight';
import { useAdministrationMenu } from './hooks/useAdministrationMenu';

const Administration: VFC<Omit<HTMLAttributes<HTMLElement>, 'is'>> = ({ className, ...props }) => {
const Administration: VFC<Omit<HTMLAttributes<HTMLElement>, 'is'>> = (props) => {
const t = useTranslation();

const sections = useAdministrationMenu();
const { className: highlightBadge } = useAdministrationHighlight();

return (
<GenericMenu
sections={sections}
title={t('Administration')}
is={Sidebar.TopBar.Action}
className={[className, highlightBadge]}
{...props}
/>
);
return <GenericMenu sections={sections} title={t('Administration')} is={Sidebar.TopBar.Action} {...props} />;
};

export default Administration;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '@rocket.chat/ui-contexts';
import React from 'react';

import { OmnichannelHighlightBadge } from '../../../../../ee/client/omnichannel/components/OmnichannelHighlightBadge';
import type { UpgradeTabVariant } from '../../../../../lib/upgradeTab';
import { getUpgradeTabLabel, isFullyFeature } from '../../../../../lib/upgradeTab';
import Emoji from '../../../../components/Emoji';
Expand Down Expand Up @@ -87,7 +86,6 @@ export const useAdministrationItems = (): GenericMenuItemProps[] => {
content: t('Omnichannel'),
icon: 'headset',
onClick: () => router.navigate('/omnichannel/current'),
addon: <OmnichannelHighlightBadge />,
};

const upgradeItem: GenericMenuItemProps = {
Expand Down
4 changes: 0 additions & 4 deletions apps/meteor/client/views/omnichannel/sidebarItems.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import React from 'react';

import { hasPermission } from '../../../app/authorization/client';
import { OmnichannelHighlightBadge } from '../../../ee/client/omnichannel/components/OmnichannelHighlightBadge';
import { createSidebarItems } from '../../lib/createSidebarItems';

export const {
Expand All @@ -14,7 +11,6 @@ export const {
href: '/omnichannel/current',
icon: 'message',
i18nLabel: 'Current_Chats',
badge: () => <OmnichannelHighlightBadge />,
permissionGranted: (): boolean => hasPermission('view-livechat-current-chats'),
},
{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 7274603

Please sign in to comment.