From 48b0b08893471cff5550fd0544b562b399130cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Wed, 13 Jan 2021 21:56:53 +0900 Subject: [PATCH] style: fixed as eslint --- components/Search.tsx | 3 ++- pages/404.tsx | 1 - pages/_app.tsx | 3 ++- utils/Query.ts | 10 +++++----- utils/Tools.ts | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/Search.tsx b/components/Search.tsx index 1c3578c..f747fd8 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -1,8 +1,9 @@ -import { useState } from 'react' +// import { useState } from 'react' const Search = ({ query, result }: SearchProps): JSX.Element => { return (
+ {query} { result }
) diff --git a/pages/404.tsx b/pages/404.tsx index 7386fe5..39505f7 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -1,5 +1,4 @@ import { NextPage } from 'next' -import Container from '../components/Container' import Notice from '../components/Notice' import { ErrorText } from '../utils/Constants' diff --git a/pages/_app.tsx b/pages/_app.tsx index 94ec492..4d49380 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,6 +1,6 @@ import Head from 'next/head' import type { AppProps } from 'next/app' -import { ThemeProvider, useTheme } from 'next-themes' +import { ThemeProvider } from 'next-themes' import { useEffect, useState } from 'react' import Footer from '../components/Footer' @@ -31,6 +31,7 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element { 'color: #ff0000; font-size: 20px; font-weight: bold;' ) try { + // eslint-disable-next-line react-hooks/exhaustive-deps systemColor = window.matchMedia('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light' } catch (e) { systemColor = 'dark' diff --git a/utils/Query.ts b/utils/Query.ts index d69c5fc..fcb7035 100644 --- a/utils/Query.ts +++ b/utils/Query.ts @@ -1,6 +1,6 @@ -import fetch from 'node-fetch' -import jwt from 'jsonwebtoken' -import fs from 'fs' +// import fetch from 'node-fetch' +// import jwt from 'jsonwebtoken' +// import fs from 'fs' import { TLRU } from 'tlru' import { Bot, User, ListType, BotList } from '../types' @@ -9,8 +9,8 @@ import { cats } from './Constants' import knex from './Knex' import DataLoader from 'dataloader' -const publicPem = fs.readFileSync('./public.pem') -const privateKey = fs.readFileSync('./private.key') +// const publicPem = fs.readFileSync('./public.pem') +// const privateKey = fs.readFileSync('./private.key') async function getBot(id: string, owners=true) { const res = await knex('bots') diff --git a/utils/Tools.ts b/utils/Tools.ts index 655ee0c..5fd9c14 100644 --- a/utils/Tools.ts +++ b/utils/Tools.ts @@ -1,5 +1,5 @@ -import { ImageFormat, ImageOptions, ImageSize, UserPemissionFlags } from '../types' -import { BASE_URLs, perms } from './Constants' +import { ImageOptions, UserPemissionFlags } from '../types' +import { perms } from './Constants' export function formatNumber(value: number):string { const suffixes = ['', '만', '억', '조','해']