diff --git a/docs/zetachain/sync/peers-seeds.mdx b/docs/zetachain/sync/peers-seeds.mdx index f4071253..b1e39e9b 100644 --- a/docs/zetachain/sync/peers-seeds.mdx +++ b/docs/zetachain/sync/peers-seeds.mdx @@ -3,10 +3,6 @@ sidebar_position: 3 description: Live Peers / Seeds --- -import Highlight from '@site/src/components/Highlight'; - -Docusaurus green - import LivePeers from '@site/src/components/LivePeers'; - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/Highlight/index.tsx b/src/components/Highlight/index.tsx deleted file mode 100644 index 18b503a2..00000000 --- a/src/components/Highlight/index.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React, { ReactNode } from "react"; - -interface HighlightProps { - children: ReactNode; - color: string; -} - -export default function Highlight({ children, color }: HighlightProps) { - return ( - - {children} - - ); -} diff --git a/src/components/LivePeers/index.tsx b/src/components/LivePeers/index.tsx index 1a2f4703..0f179928 100644 --- a/src/components/LivePeers/index.tsx +++ b/src/components/LivePeers/index.tsx @@ -6,13 +6,17 @@ type Peer = { port: string; }; -const LivePeers: React.FC = () => { +interface LivePeersProps { + rpc: string; +} + +const LivePeers: React.FC = ({ rpc }) => { const [peers, setPeers] = useState([]); useEffect(() => { const fetchLivePeers = async () => { try { - const response = await fetch("https://zetachain-rpc.f5nodes.com/net_info"); + const response = await fetch(rpc); const data = await response.json(); const extractedPeers = data.result.peers.map((peer: any) => { @@ -36,6 +40,9 @@ const LivePeers: React.FC = () => { return (

Peers Information

+

+ All peers: {peers.length} +

    {peers.map((peer) => (