mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Fix: crash on latest react-table
This commit is contained in:
parent
f8fca04be8
commit
a2f16db405
11275
package-lock.json
generated
11275
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -58,7 +58,7 @@
|
|||||||
"eslint-plugin-react": "^7.19.0",
|
"eslint-plugin-react": "^7.19.0",
|
||||||
"eslint-plugin-standard": "^4.0.1",
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"html-webpack-plugin": "^4.0.3",
|
"html-webpack-plugin": "^4.0.4",
|
||||||
"image-webpack-loader": "^6.0.0",
|
"image-webpack-loader": "^6.0.0",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"offline-plugin": "^5.0.7",
|
"offline-plugin": "^5.0.7",
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-router-dom": "^5.1.2",
|
"react-router-dom": "^5.1.2",
|
||||||
"react-table": "^7.0.0-rc.16",
|
"react-table": "^7.0.2",
|
||||||
"react-virtualized-auto-sizer": "^1.0.2",
|
"react-virtualized-auto-sizer": "^1.0.2",
|
||||||
"react-window": "^1.8.5",
|
"react-window": "^1.8.5",
|
||||||
"swr": "^0.2.0",
|
"swr": "^0.2.0",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useMemo } from 'react'
|
import React, { useMemo, useLayoutEffect } from 'react'
|
||||||
import { useBlockLayout, useResizeColumns, useTable } from 'react-table'
|
import { useBlockLayout, useResizeColumns, useTable } from 'react-table'
|
||||||
import classnames from 'classnames'
|
import classnames from 'classnames'
|
||||||
import { Header, Card, Checkbox, Modal, Icon } from '@components'
|
import { Header, Card, Checkbox, Modal, Icon } from '@components'
|
||||||
@ -63,7 +63,7 @@ function formatSpeed (upload: number, download: number) {
|
|||||||
|
|
||||||
export default function Connections () {
|
export default function Connections () {
|
||||||
const { useTranslation, lang } = containers.useI18n()
|
const { useTranslation, lang } = containers.useI18n()
|
||||||
const { t } = useTranslation('Connections')
|
const t = useMemo(() => useTranslation('Connections').t, [useTranslation])
|
||||||
|
|
||||||
// total
|
// total
|
||||||
const [traffic, setTraffic] = useObject({
|
const [traffic, setTraffic] = useObject({
|
||||||
@ -138,9 +138,9 @@ export default function Connections () {
|
|||||||
minWidth: c[1],
|
minWidth: c[1],
|
||||||
width: c[1]
|
width: c[1]
|
||||||
})
|
})
|
||||||
), [lang, t])
|
), [t])
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
const streamReader: StreamReader<API.Snapshot> = null
|
const streamReader: StreamReader<API.Snapshot> = null
|
||||||
|
|
||||||
function handleConnection (snapshots: API.Snapshot[]) {
|
function handleConnection (snapshots: API.Snapshot[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user