Skip to content

Commit

Permalink
Remove NewBadge from SideNav (#4788)
Browse files Browse the repository at this point in the history
  • Loading branch information
gettinToasty authored Nov 27, 2023
1 parent 0aa4e1c commit 505e514
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions app/components-react/sidebar/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ import styles from './SideNav.m.less';
import { Layout, Button } from 'antd';
import Scrollable from 'components-react/shared/Scrollable';
import HelpTip from 'components-react/shared/HelpTip';
import NewBadge from 'components-react/shared/NewBadge';
import FeaturesNav from './FeaturesNav';

const { Sider } = Layout;

export default function SideNav() {
const { CustomizationService, SideNavService, WindowsService, DismissablesService } = Services;
const { CustomizationService, SideNavService, WindowsService } = Services;

function updateSubMenu() {
// when opening/closing the navbar swap the submenu current menu item
Expand All @@ -40,19 +39,13 @@ export default function SideNav() {
isOpen,
toggleMenuStatus,
updateStyleBlockers,
dismiss,
showNewBadge,
} = useVuex(() => ({
currentMenuItem: SideNavService.views.currentMenuItem,
setCurrentMenuItem: SideNavService.actions.setCurrentMenuItem,
leftDock: CustomizationService.state.leftDock,
isOpen: SideNavService.views.isOpen,
toggleMenuStatus: SideNavService.actions.toggleMenuStatus,
updateStyleBlockers: WindowsService.actions.updateStyleBlockers,
dismiss: DismissablesService.actions.dismiss,
showNewBadge:
DismissablesService.views.shouldShow(EDismissable.NewSideNav) &&
SideNavService.views.hasLegacyMenu,
}));

const sider = useRef<HTMLDivElement | null>(null);
Expand Down Expand Up @@ -110,22 +103,13 @@ export default function SideNav() {
leftDock && styles.leftDock,
)}
onClick={() => {
showNewBadge && dismiss(EDismissable.NewSideNav);
updateSubMenu();
toggleMenuStatus();
updateStyleBlockers('main', true); // hide style blockers
}}
>
<i className="icon-back" />
</Button>

{/* if it's a legacy menu, show new badge */}
<NewBadge
dismissableKey={EDismissable.NewSideNav}
size="small"
absolute
style={{ left: 'calc(100% / 20px)', top: 'calc(100% / 2)' }}
/>
</Layout>
);
}
Expand Down

0 comments on commit 505e514

Please sign in to comment.