1
0
Fork 0

fix: eslint errors

This commit is contained in:
Vojtěch Mareš 2023-06-27 14:01:32 +02:00
parent 1cfdda4e19
commit 44a95cbf1c
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
6 changed files with 60 additions and 36 deletions

View file

@ -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],

View file

@ -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',