From 150532445b04d0d1284e1f49f001a7d387119282 Mon Sep 17 00:00:00 2001 From: FinnIckler Date: Mon, 5 Jun 2023 16:01:58 +0200 Subject: [PATCH] make eslint happy --- src/components/Header/Dropdown.tsx | 32 +++++++++++++++++------------- src/components/Header/Header.tsx | 6 +++--- src/components/index.ts | 2 +- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/components/Header/Dropdown.tsx b/src/components/Header/Dropdown.tsx index 9d3cb82..b21f6e6 100644 --- a/src/components/Header/Dropdown.tsx +++ b/src/components/Header/Dropdown.tsx @@ -1,16 +1,19 @@ -import UiIcon from '../UiIcon' import React, { useState } from 'react' +import UiIcon from '../UiIcon' -type Item = { +interface Item { path: string title: string icon: string } -type Divider = { +interface Divider { divider: true } +// eslint-disable-next-line no-prototype-builtins +const isDivider = (item: object) => item.hasOwnProperty('divider') + export interface DropdownProps { active?: boolean icon: string @@ -35,24 +38,25 @@ export default function Dropdown({ onMouseEnter={toggleHover} onMouseLeave={toggleHover} > + {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} {title} - + diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 22e01c6..53a98df 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -21,9 +21,9 @@ export default function Header({ brandImage, dropdowns }: HeaderProps) { data-toggle="collapse" data-target=".navbar-collapse" > - - - + + +
    diff --git a/src/components/index.ts b/src/components/index.ts index 9a3a0da..98ec2f1 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,5 +1,5 @@ export { default as CubingIcon } from './CubingIcon' +export { default as EventSelector } from './EventSelector' export { default as Footer } from './Footer' export { default as Header } from './Header' export { default as UiIcon } from './UiIcon' -export { default as EventSelector } from './EventSelector'