mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
fix sonarcloud code smells
This commit is contained in:
parent
248dc4fe85
commit
241550c751
3 changed files with 4 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, Fragment, useState } from 'react';
|
||||
import React, { FC, useState } from 'react';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import EqualizerIcon from '@material-ui/icons/EqualizerSharp';
|
||||
|
|
@ -11,7 +11,6 @@ import Find from 'lodash/find';
|
|||
import IconButton from '@material-ui/core/IconButton';
|
||||
import InfoIcon from '@material-ui/icons/Info';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { formatBytes } from 'shared/utils/formatBytes';
|
||||
import { nodeInfo } from './nodeInfo';
|
||||
import { NODE_STATE } from './nodeStatus';
|
||||
|
|
|
|||
|
|
@ -4,19 +4,16 @@ import Breadcrumbs from '@material-ui/core/Breadcrumbs';
|
|||
import classNames from 'classnames';
|
||||
import Fuse from 'fuse.js';
|
||||
import Highlighter from 'react-highlight-words';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import Link from '@material-ui/core/Link';
|
||||
import map from 'lodash/map';
|
||||
import moment from 'moment';
|
||||
import OrderBy from 'lodash/orderBy';
|
||||
import Reduce from 'lodash/reduce';
|
||||
import Table from '@material-ui/core/Table';
|
||||
import TableBody from '@material-ui/core/TableBody';
|
||||
import TableCell from '@material-ui/core/TableCell';
|
||||
import TableHead from '@material-ui/core/TableHead';
|
||||
import TableRow from '@material-ui/core/TableRow';
|
||||
import TextField from '@material-ui/core/TextField';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { Block } from 'shared/Block';
|
||||
import { Pager } from 'shared/Pager';
|
||||
|
|
@ -36,11 +33,9 @@ export const MoleculaTable: FC<MoleculaTableProps> = ({
|
|||
const sliceStart = (page - 1) * resultsPerPage;
|
||||
const [searchText, setSearchText] = useState<string>('');
|
||||
const [filteredFields, setFiltereedFields] = useState(table.fields);
|
||||
const [fieldsData, setFieldsData] = useState<{}>({});
|
||||
const [maxFieldSize, setMaxFieldSize] = useState<number>(0);
|
||||
const [fieldsData] = useState<{}>({});
|
||||
const [sort, setSort] = useState<string>('total');
|
||||
const [sortDir, setSortDir] = useState<'asc' | 'desc'>('desc');
|
||||
const lastUpdatedMoment = lastUpdated ? moment(lastUpdated).utc() : undefined;
|
||||
|
||||
useEffect(() => {
|
||||
if (searchText.length > 1) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import OrderBy from 'lodash/orderBy';
|
||||
import { MoleculaTable } from './MoleculaTable';
|
||||
import { MoleculaTables } from './MoleculaTables';
|
||||
import { pilosa } from 'services/eventServices';
|
||||
|
|
@ -12,8 +11,8 @@ export const MoleculaTablesContainer = () => {
|
|||
const history = useHistory();
|
||||
const [tables, setTables] = useState<any>();
|
||||
const [selectedTable, setSelectedTable] = useState<any>();
|
||||
const [maxSize, setMaxSize] = useState<number>(0);
|
||||
const [lastUpdated, setLastUpdated] = useState<string>('');
|
||||
const [maxSize] = useState<number>(0);
|
||||
const [lastUpdated] = useState<string>('');
|
||||
|
||||
useEffectOnce(() => {
|
||||
pilosa.get
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue