Add eslint for react hooks and nextjs.
This commit is contained in:
parent
eb3fed171d
commit
0d77a66503
10
web/.eslintrc.js
Normal file
10
web/.eslintrc.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module.exports = {
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
extends: [
|
||||||
|
'plugin:react-hooks/recommended',
|
||||||
|
'plugin:@next/next/recommended',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
// Add or disable rules here.
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
import { Popover } from '@headlessui/react'
|
import { Popover } from '@headlessui/react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
const navigation = [
|
const navigation = [
|
||||||
{
|
{
|
||||||
|
@ -21,7 +22,7 @@ export function Header() {
|
||||||
<div className="flex items-center justify-between w-full md:w-auto">
|
<div className="flex items-center justify-between w-full md:w-auto">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<a className="inline-grid grid-flow-col align-items-center h-6 sm:h-10">
|
<a className="inline-grid grid-flow-col align-items-center h-6 sm:h-10">
|
||||||
<img
|
<Image
|
||||||
className="w-auto h-6 sm:h-10 inline-block mr-3"
|
className="w-auto h-6 sm:h-10 inline-block mr-3"
|
||||||
src="/logo-icon.svg"
|
src="/logo-icon.svg"
|
||||||
/>
|
/>
|
||||||
|
@ -34,9 +35,11 @@ export function Header() {
|
||||||
|
|
||||||
<div className="space-x-8 md:flex md:ml-16">
|
<div className="space-x-8 md:flex md:ml-16">
|
||||||
{navigation.map((item) => (
|
{navigation.map((item) => (
|
||||||
<Link href={item.href}>
|
<Link
|
||||||
<a
|
|
||||||
key={item.name}
|
key={item.name}
|
||||||
|
href={item.href}
|
||||||
|
>
|
||||||
|
<a
|
||||||
className="text-base font-medium text-white hover:text-gray-300"
|
className="text-base font-medium text-white hover:text-gray-300"
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user