diff --git a/webapp/grebi_ui/src/frontends/ebi/pages/EbiHomePage.tsx b/webapp/grebi_ui/src/frontends/ebi/pages/EbiHomePage.tsx index 71e08d5..2b1f45d 100644 --- a/webapp/grebi_ui/src/frontends/ebi/pages/EbiHomePage.tsx +++ b/webapp/grebi_ui/src/frontends/ebi/pages/EbiHomePage.tsx @@ -6,13 +6,12 @@ import { MenuItem, Select } from "@mui/material"; import { get } from "../../../app/api"; import EbiHeader from "../EbiHeader"; import SearchBox from "../../../components/SearchBox"; -import Stats from "../../../model/Stats"; export default function EbiHomePage() { document.title = "EMBL-EBI Knowledge Graph"; - let [stats, setStats] = useState(null); + let [stats, setStats] = useState(null); let [subgraphs, setSubgraphs] = useState(null); let [subgraph, setSubgraph] = useState(null); @@ -73,7 +72,7 @@ export default function EbiHomePage() {
- {stats ? ( + {stats && subgraph && stats[subgraph] ? (
{/*
Updated  @@ -82,8 +81,8 @@ export default function EbiHomePage() { )}
*/}

- {stats.num_nodes.toLocaleString()} nodes
- {stats.num_edges.toLocaleString()} edges + {stats[subgraph].num_nodes.toLocaleString()} nodes
+ {stats[subgraph].num_edges.toLocaleString()} edges

) : ( diff --git a/webapp/grebi_ui/src/model/Stats.ts b/webapp/grebi_ui/src/model/Stats.ts deleted file mode 100644 index 9ccf681..0000000 --- a/webapp/grebi_ui/src/model/Stats.ts +++ /dev/null @@ -1,5 +0,0 @@ - -export default interface Stats { - num_nodes: number; - num_edges: number; -} \ No newline at end of file