Skip to content

Commit

Permalink
refactor(apps/documentation): remove lint errors (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Dec 7, 2024
1 parent c491ece commit 96502b1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions apps/documentation/src/components/sidebar/config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
import type { ReactNode } from 'react'

interface SidebarElementType<T> {
interface SidebarElementBase<T extends string> {
type: T
}

interface SidebarLink extends SidebarElementType<'element'> {
type SidebarDivider = SidebarElementBase<'divider'>

interface SidebarLink extends SidebarElementBase<'element'> {
label: string
href: string
children?: SidebarLink[]
children?: Array<SidebarLink>
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<SidebarElement> = [
{
type: 'element',
label: 'Home',
Expand Down

0 comments on commit 96502b1

Please sign in to comment.