From c5c5f6b4f0a995e0fa7a1e5d4a2e002c422108c9 Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Wed, 8 Jan 2025 13:38:32 -0500 Subject: [PATCH] remove chips and improve preference managing --- .../src/components/PrimaryNav/PrimaryLink.tsx | 13 +- .../PrimaryNav/PrimaryNav.styles.ts | 9 -- .../src/components/PrimaryNav/PrimaryNav.tsx | 117 ++++++++++-------- packages/manager/src/features/Footer.tsx | 8 -- 4 files changed, 70 insertions(+), 77 deletions(-) diff --git a/packages/manager/src/components/PrimaryNav/PrimaryLink.tsx b/packages/manager/src/components/PrimaryNav/PrimaryLink.tsx index b626899c35a..f2f50d090eb 100644 --- a/packages/manager/src/components/PrimaryNav/PrimaryLink.tsx +++ b/packages/manager/src/components/PrimaryNav/PrimaryLink.tsx @@ -1,17 +1,13 @@ import { BetaChip } from '@linode/ui'; import * as React from 'react'; -import { - StyledActiveLink, - StyledChip, - StyledPrimaryLinkBox, -} from './PrimaryNav.styles'; +import { StyledActiveLink, StyledPrimaryLinkBox } from './PrimaryNav.styles'; import type { NavEntity } from './PrimaryNav'; import type { CreateEntity } from 'src/features/TopMenu/CreateMenu/CreateMenu'; export interface BaseNavLink { - attr?: { [key: string]: any }; + attr?: { [key: string]: unknown }; display: CreateEntity | NavEntity; hide?: boolean; href: string; @@ -21,8 +17,7 @@ export interface PrimaryLink extends BaseNavLink { activeLinks?: Array; betaChipClassName?: string; isBeta?: boolean; - label?: string; - onClick?: (e: React.ChangeEvent) => void; + onClick?: (e: React.ChangeEvent) => void; } interface PrimaryLinkProps extends PrimaryLink { @@ -41,7 +36,6 @@ const PrimaryLink = React.memo((props: PrimaryLinkProps) => { isActiveLink, isBeta, isCollapsed, - label, onClick, } = props; @@ -60,7 +54,6 @@ const PrimaryLink = React.memo((props: PrimaryLinkProps) => { isActiveLink={isActiveLink} isCollapsed={isCollapsed} > -