diff options
| author | Haishan <[email protected]> | 2020-05-14 22:50:48 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-05-14 22:50:48 +0800 |
| commit | faf4cba37c8dd123600a62ec4feb39cccd851bcb (patch) | |
| tree | 144bc503428ff891e74684da487f04e2fce90d57 /src/components/Logs.js | |
| parent | aceb1b4a365b1d86d66c0538011580eb01270219 (diff) | |
chore: lib classnames -> clsx
Diffstat (limited to 'src/components/Logs.js')
| -rw-r--r-- | src/components/Logs.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/Logs.js b/src/components/Logs.js index 8bc83cc..26c0c78 100644 --- a/src/components/Logs.js +++ b/src/components/Logs.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import cx from 'classnames'; +import cx from 'clsx'; import { connect } from './StateProvider'; // import { useStoreState, useActions } from '../misc/store'; @@ -25,7 +25,7 @@ const colors = { info: '#454545', // info: '#147d14', warning: '#b99105', - error: '#c11c1c' + error: '#c11c1c', }; function LogLine({ time, even, payload, type }) { @@ -47,7 +47,7 @@ LogLine.propTypes = { time: PropTypes.string, even: PropTypes.bool, payload: PropTypes.string, - type: PropTypes.string + type: PropTypes.string, }; function itemKey(index, data) { @@ -67,7 +67,7 @@ const Row = memo(({ index, style, data }) => { function Logs({ dispatch, logLevel, apiConfig, logs }) { const { hostname, port, secret } = apiConfig; const appendLogInternal = useCallback( - log => { + (log) => { dispatch(appendLog(log)); }, [dispatch] @@ -111,10 +111,10 @@ function Logs({ dispatch, logLevel, apiConfig, logs }) { ); } -const mapState = s => ({ +const mapState = (s) => ({ logs: getLogsForDisplay(s), logLevel: getLogLevel(s), - apiConfig: getClashAPIConfig(s) + apiConfig: getClashAPIConfig(s), }); export default connect(mapState)(Logs); |
