From faf4cba37c8dd123600a62ec4feb39cccd851bcb Mon Sep 17 00:00:00 2001 From: Haishan Date: Thu, 14 May 2020 22:50:48 +0800 Subject: chore: lib classnames -> clsx --- src/components/ConnectionTable.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/components/ConnectionTable.js') diff --git a/src/components/ConnectionTable.js b/src/components/ConnectionTable.js index 52fd1d6..a6c90b1 100644 --- a/src/components/ConnectionTable.js +++ b/src/components/ConnectionTable.js @@ -2,7 +2,7 @@ import React from 'react'; import { ChevronDown } from 'react-feather'; import prettyBytes from '../misc/pretty-bytes'; import { formatDistance } from 'date-fns'; -import cx from 'classnames'; +import cx from 'clsx'; import { useTable, useSortBy } from 'react-table'; import s from './ConnectionTable.module.css'; @@ -21,7 +21,7 @@ const columns = [ { Header: 'Time', accessor: 'start' }, { Header: 'Source IP', accessor: 'sourceIP' }, { Header: 'Source Port', accessor: 'sourcePort' }, - { Header: 'Destination IP', accessor: 'destinationIP' } + { Header: 'Destination IP', accessor: 'destinationIP' }, ]; function renderCell(cell, now) { @@ -43,9 +43,9 @@ const sortById = { id: 'id', desc: true }; const tableState = { sortBy: [ // maintain a more stable order - sortById + sortById, ], - hiddenColumns: ['id'] + hiddenColumns: ['id'], }; function Table({ data }) { @@ -55,17 +55,17 @@ function Table({ data }) { columns, data, initialState: tableState, - autoResetSortBy: false + autoResetSortBy: false, }, useSortBy ); return (
- {headerGroups.map(headerGroup => { + {headerGroups.map((headerGroup) => { return (
- {headerGroup.headers.map(column => ( + {headerGroup.headers.map((column) => (