react-icons/fa#FaSitemap TypeScript Examples

The following examples show how to use react-icons/fa#FaSitemap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WatchView.tsx    From 3Speak-app with GNU General Public License v3.0 6 votes vote down vote up
function DHTProviders(props) {
  const [peers, setPeers] = useState(0)
  useEffect(() => {
    void load()
    async function load() {
      if (!props.rootCid) {
        return
      }
      let out = 0
      for await (const pov of ipfsClient.dht.findProvs(props.rootCid)) {
        out = out + 1
        setPeers(out)
      }
      setPeers(out)
    }
  }, [])
  return (
    <div>
      <FaSitemap /> DHT Providers <strong>{peers}</strong>
    </div>
  )
}