diff --git a/ui/apps/dashboard/components/Network.jsx b/ui/apps/dashboard/components/Network.jsx index d8cac5a..645291c 100644 --- a/ui/apps/dashboard/components/Network.jsx +++ b/ui/apps/dashboard/components/Network.jsx @@ -1,12 +1,13 @@ import "./Network.scss"; import { useEffect, useState } from "react"; import classNames from "classnames"; -import { getNetworkModuleStatus } from "@lumeweb/libkernel"; +import { callModule, getNetworkModuleStatus } from "@lumeweb/libkernel"; export default function Network({ module }) { let [ready, setReady] = useState(false); let [sync, setSync] = useState(null); let [peers, setPeers] = useState(0); + let [name, setName] = useState(); useEffect(() => { const destroy = getNetworkModuleStatus((data) => { @@ -15,6 +16,10 @@ export default function Network({ module }) { setPeers(data.peers); }, module); + callModule(module, "name").then((value) => { + setName(value); + }); + return () => destroy?.(); }, [module]); @@ -29,7 +34,7 @@ export default function Network({ module }) { "icon-wait": !ready, })} /> - Network + {name} Network {ready ? (
Synced