From 96502b18d0ef262e684fedaaf100b67e464b78c4 Mon Sep 17 00:00:00 2001 From: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:28:57 +0100 Subject: [PATCH] refactor(apps/documentation): remove lint errors (#206) --- .../src/components/sidebar/config.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/documentation/src/components/sidebar/config.ts b/apps/documentation/src/components/sidebar/config.ts index 7ea112fb..58367e01 100644 --- a/apps/documentation/src/components/sidebar/config.ts +++ b/apps/documentation/src/components/sidebar/config.ts @@ -1,26 +1,25 @@ import type { ReactNode } from 'react' -interface SidebarElementType { +interface SidebarElementBase { type: T } -interface SidebarLink extends SidebarElementType<'element'> { +type SidebarDivider = SidebarElementBase<'divider'> + +interface SidebarLink extends SidebarElementBase<'element'> { label: string href: string - children?: SidebarLink[] + children?: Array leftIcon?: ReactNode } -interface SidebarTitle extends SidebarElementType<'title'> { +interface SidebarTitle extends SidebarElementBase<'title'> { label: string } -type SidebarElements = - | SidebarElementType<'divider'> - | SidebarLink - | SidebarTitle +type SidebarElement = SidebarDivider | SidebarLink | SidebarTitle -export const sidebarElements: SidebarElements[] = [ +export const sidebarElements: Array = [ { type: 'element', label: 'Home',