fix: eslint errors
This commit is contained in:
parent
1cfdda4e19
commit
44a95cbf1c
6 changed files with 60 additions and 36 deletions
|
|
@ -1,9 +1,6 @@
|
|||
import clsx from "clsx";
|
||||
import Link from "next/link";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
function classNames(...classes: any) {
|
||||
return classes.filter(Boolean).join(' ')
|
||||
}
|
||||
import { type ReactNode } from "react";
|
||||
|
||||
const baseStyles = {
|
||||
solid:
|
||||
|
|
@ -58,7 +55,7 @@ export function Button({
|
|||
throw new Error("Outline buttons cannot be amber");
|
||||
}
|
||||
|
||||
className = classNames(
|
||||
className = clsx(
|
||||
baseStyles[variant],
|
||||
variantStyles[variant][color],
|
||||
sizeStyles[size],
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import clsx from "clsx";
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Fragment, useState } from 'react';
|
||||
|
|
@ -15,10 +16,6 @@ const navigation = [
|
|||
{ name: 'Trainings', href: '/trainings', icon: AcademicCapIcon },
|
||||
]
|
||||
|
||||
function classNames(...classes: any) {
|
||||
return classes.filter(Boolean).join(' ')
|
||||
}
|
||||
|
||||
export function Sidebar() {
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false)
|
||||
const router = useRouter();
|
||||
|
|
@ -79,7 +76,7 @@ export function Sidebar() {
|
|||
<li key={item.name}>
|
||||
<Link
|
||||
href={item.href}
|
||||
className={classNames(
|
||||
className={clsx(
|
||||
router.pathname === item.href
|
||||
? 'bg-gray-800 text-white'
|
||||
: 'text-gray-400 hover:text-white hover:bg-gray-800',
|
||||
|
|
@ -117,7 +114,7 @@ export function Sidebar() {
|
|||
<li key={item.name}>
|
||||
<Link
|
||||
href={item.href}
|
||||
className={classNames(
|
||||
className={clsx(
|
||||
router.pathname === item.href
|
||||
? 'bg-gray-800 text-white'
|
||||
: 'text-gray-400 hover:text-white hover:bg-gray-800',
|
||||
|
|
|
|||
Reference in a new issue