Skip to content

Commit

Permalink
fix overview
Browse files Browse the repository at this point in the history
Signed-off-by: ruiyi.jiang <[email protected]>
  • Loading branch information
shanghaikid committed Aug 4, 2023
1 parent 2b90e23 commit b18aab3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/pages/overview/Overview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { makeStyles, Theme, Typography, useTheme } from '@material-ui/core';
import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { databaseContext } from '@/context/Database';
import EmptyCard from '@/components/cards/EmptyCard';
import icons from '@/components/icons/Icons';
import { WS_EVENTS, WS_EVENTS_TYPE } from '../../consts/Http';
import { LOADING_STATE } from '../../consts/Milvus';
import { WS_EVENTS, WS_EVENTS_TYPE } from '@/consts/Http';
import { LOADING_STATE } from '@/consts/Milvus';
import { rootContext } from '@/context/Root';
import { webSocketContext } from '@/context/WebSocket';
import { useNavigationHook } from '@/hooks/Navigation';
Expand All @@ -13,7 +14,6 @@ import { MilvusHttp } from '@/http/Milvus';
import { ALL_ROUTER_TYPES } from '@/router/Types';
import { formatNumber } from '@/utils/Common';
import { checkLoading, checkIndexBuilding } from '@/utils/Validation';
import { CollectionData } from '../collections/Types';
import CollectionCard from './collectionCard/CollectionCard';
import StatisticsCard from './statisticsCard/StatisticsCard';

Expand All @@ -33,6 +33,7 @@ const useStyles = makeStyles((theme: Theme) => ({

const Overview = () => {
useNavigationHook(ALL_ROUTER_TYPES.OVERVIEW);
const { database } = useContext(databaseContext);
const classes = useStyles();
const theme = useTheme();
const { t: overviewTrans } = useTranslation('overview');
Expand Down Expand Up @@ -66,7 +67,7 @@ const Overview = () => {
setStatistics(res);
setCollections(collections);
setLoading(false);
}, [setCollections]);
}, [setCollections, database]);

useEffect(() => {
fetchData();
Expand Down

0 comments on commit b18aab3

Please sign in to comment.