chore: make eslint happy

This commit is contained in:
Haishan 2019-01-14 00:30:47 +08:00
parent fd07fae633
commit 2ee638b9ca
2 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
import React, { memo, useState, useEffect } from 'react'; import React, { memo, useEffect } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import { useStoreState, useActions } from 'm/store'; 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) { function itemKey(index, data) {
const item = data[index]; const item = data[index];
return item.id; return item.id;
@ -64,7 +71,7 @@ export default function Logs() {
useEffect( useEffect(
() => { () => {
const x = fetchLogs({ hostname, port, secret }, appendLog); fetchLogs({ hostname, port, secret }, appendLog);
}, },
[hostname, port, secret] [hostname, port, secret]
); );

View file

@ -1,11 +1,4 @@
import React, { import React, { memo, useEffect } from 'react';
memo,
useEffect,
useState,
useRef,
useLayoutEffect,
useCallback
} from 'react';
import { useActions, useStoreState } from 'm/store'; import { useActions, useStoreState } from 'm/store';
import Button from 'c/Button'; import Button from 'c/Button';
import { FixedSizeList as List, areEqual } from 'react-window'; import { FixedSizeList as List, areEqual } from 'react-window';