diff options
| author | Larvan2 <[email protected]> | 2026-03-15 15:01:57 +0800 |
|---|---|---|
| committer | Larvan2 <[email protected]> | 2026-03-15 15:01:57 +0800 |
| commit | 0e420859f5f7011ba124c965d8319bf3bf4c5fe3 (patch) | |
| tree | 2fc344b757e119ebae6e0b6243121fddba61603c /src/components/ConnectionTable.tsx | |
| parent | 17c4d2855ffb6914fcbece27367bafdd27a4c182 (diff) | |
refactor: reorganize code
Diffstat (limited to 'src/components/ConnectionTable.tsx')
| -rw-r--r-- | src/components/ConnectionTable.tsx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/components/ConnectionTable.tsx b/src/components/ConnectionTable.tsx index 89f8f3f..8a2f0a6 100644 --- a/src/components/ConnectionTable.tsx +++ b/src/components/ConnectionTable.tsx @@ -10,16 +10,14 @@ import { useSortBy, useTable } from 'react-table'; import { FixedSizeList as List } from 'react-window'; import { FormattedConn } from '~/store/connections'; -import { State } from '~/store/types'; import * as connAPI from '../api/connections'; import prettyBytes from '../misc/pretty-bytes'; -import { getClashAPIConfig } from '../store/app'; + import ConnectionCard from './ConnectionCard'; import s from './ConnectionTable.module.scss'; import MOdalCloseConnection from './ModalCloseAllConnections'; import ModalConnectionDetails from './ModalConnectionDetails'; -import { connect } from './StateProvider'; const sortById = { id: 'id', desc: true }; @@ -376,8 +374,4 @@ function Table({ data, columns, hiddenColumns, apiConfig, height }) { ); } -const mapState = (s: State) => ({ - apiConfig: getClashAPIConfig(s), -}); - -export default connect(mapState)(Table); +export default Table; |
