From 48f1f49bef5efc20223716bbff44a6d62f8ce427 Mon Sep 17 00:00:00 2001 From: dak2 Date: Sat, 15 Jul 2023 15:45:10 +0900 Subject: [PATCH] eslint --- components/atoms/genericIcon.tsx | 60 +++++++++++++++++------------ components/molecules/headerBar.tsx | 10 +++-- components/molecules/layout.tsx | 2 +- components/molecules/pagination.tsx | 32 +++++++++------ lib/api.ts | 2 +- lib/myHighlight.ts | 24 ++++++++++-- lib/type.ts | 2 +- next-env.d.ts | 5 ++- pages/404.tsx | 8 ++-- pages/_app.tsx | 5 ++- pages/archives/tags/[...params].tsx | 19 +++++---- pages/index.tsx | 7 +++- pages/posts/[id].tsx | 31 ++++++++------- pages/posts/page/[id].tsx | 11 ++++-- tsconfig.json | 5 ++- 15 files changed, 141 insertions(+), 82 deletions(-) diff --git a/components/atoms/genericIcon.tsx b/components/atoms/genericIcon.tsx index afa6bc0..fe932e4 100644 --- a/components/atoms/genericIcon.tsx +++ b/components/atoms/genericIcon.tsx @@ -1,36 +1,48 @@ -import { FaGithub, FaAws, FaDocker, FaChevronLeft, FaChevronRight, FaRust, FaNodeJs, FaReact, FaBookOpen } from 'react-icons/fa'; -import { SiJavascript, SiRuby, SiRubyonrails, SiTypescript, SiDeno } from 'react-icons/si'; +import { + FaGithub, + FaAws, + FaDocker, + FaChevronLeft, + FaChevronRight, + FaRust, + FaNodeJs, + FaReact, + FaBookOpen, +} from 'react-icons/fa'; +import { + SiJavascript, + SiRuby, + SiRubyonrails, + SiTypescript, + SiDeno, +} from 'react-icons/si'; type Props = { iconName: string; styleName?: string; -} +}; const GenericIcon = (props: Props) => { const iconName = props.iconName; const styleName = props.styleName; const icons = { - 'aws': , - 'docker': , - 'github': , - 'javascript': , - 'typescript': , - 'nodejs': , - 'react': , - 'ruby': , - 'ruby-on-rails': , - 'rust': , - 'deno': , - 'right': , - 'left': , - 'book': , - } + aws: , + docker: , + github: , + javascript: , + typescript: , + nodejs: , + react: , + ruby: , + 'ruby-on-rails': , + rust: , + deno: , + right: , + left: , + book: , + }; - return ( -
- {icons[iconName]} -
- ) -} + return
{icons[iconName]}
; +}; export default GenericIcon; diff --git a/components/molecules/headerBar.tsx b/components/molecules/headerBar.tsx index 55d63e3..c1efd3f 100644 --- a/components/molecules/headerBar.tsx +++ b/components/molecules/headerBar.tsx @@ -3,14 +3,18 @@ import GenericIcon from '../atoms/genericIcon'; const HeaderBar = () => { return ( -