From 2ee638b9ca0b3ee937ba190a3dab58eeb798c647 Mon Sep 17 00:00:00 2001 From: Haishan Date: Mon, 14 Jan 2019 00:30:47 +0800 Subject: [PATCH] chore: make eslint happy --- src/components/Logs.js | 11 +++++++++-- src/components/Rules.js | 9 +-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/Logs.js b/src/components/Logs.js index 2990502..424765a 100644 --- a/src/components/Logs.js +++ b/src/components/Logs.js @@ -1,4 +1,4 @@ -import React, { memo, useState, useEffect } from 'react'; +import React, { memo, useEffect } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { useStoreState, useActions } from 'm/store'; @@ -41,6 +41,13 @@ function LogLine({ time, even, payload, type }) { ); } +LogLine.propTypes = { + time: PropTypes.string, + even: PropTypes.bool, + payload: PropTypes.string, + type: PropTypes.string +}; + function itemKey(index, data) { const item = data[index]; return item.id; @@ -64,7 +71,7 @@ export default function Logs() { useEffect( () => { - const x = fetchLogs({ hostname, port, secret }, appendLog); + fetchLogs({ hostname, port, secret }, appendLog); }, [hostname, port, secret] ); diff --git a/src/components/Rules.js b/src/components/Rules.js index 8e3f991..ad652e4 100644 --- a/src/components/Rules.js +++ b/src/components/Rules.js @@ -1,11 +1,4 @@ -import React, { - memo, - useEffect, - useState, - useRef, - useLayoutEffect, - useCallback -} from 'react'; +import React, { memo, useEffect } from 'react'; import { useActions, useStoreState } from 'm/store'; import Button from 'c/Button'; import { FixedSizeList as List, areEqual } from 'react-window';