diff --git a/dashboard/package.json b/dashboard/package.json index a582a887ba..a0e3654c30 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -54,7 +54,7 @@ "build": "react-scripts build && ./bin/copy-to-static", "dev": "EXTEND_ESLINT=true npm run start", "fix-format": "prettier --write \"{src,test}/**/*.{ts,tsx}\"", - "lint": "tslint -p .", + "lint": "eslint \"{src,test}/**/*.{ts,tsx}\"", "test-watch": "react-scripts test", "test": "CI=true react-scripts test", "eject": "react-scripts eject" diff --git a/dashboard/src/containers/logs.tsx b/dashboard/src/containers/logs.tsx index 5d2c720902..75f818f34f 100644 --- a/dashboard/src/containers/logs.tsx +++ b/dashboard/src/containers/logs.tsx @@ -36,6 +36,13 @@ export default () => { } }, [dispatch, requestStates.logs, serviceNames]) + const handleRefresh = useCallback( + (names: string[]) => { + loadLogs(dispatch, names) + }, + [dispatch] + ) + if (!(requestStates.config.initLoadComplete && requestStates.logs.initLoadComplete)) { return } @@ -44,12 +51,5 @@ export default () => { return } - const handleRefresh = useCallback( - (names: string[]) => { - loadLogs(dispatch, names) - }, - [dispatch] - ) - return }