plebbit / plebbit-react

A GUI for plebbit
https://plebbitapp.eth.limo
GNU General Public License v2.0
35 stars 6 forks source link

Add real subplebbit stats #251

Closed estebanabaroa closed 1 year ago

estebanabaroa commented 1 year ago

Screenshot 2023-04-13 at 22-04-47 plebbit

It is possible to get subplebbit stats using useSubplebbitStats({subplebbitAddress}) https://github.com/plebbit/plebbit-react-hooks/#get-a-subplebbit

The stats values are

SubplebbitStats {
  hourActiveUserCount: number
  dayActiveUserCount: number
  weekActiveUserCount: number
  monthActiveUserCount: number
  yearActiveUserCount: number
  allActiveUserCount: number
  hourPostCount: number
  dayPostCount: number
  weekPostCount: number
  monthPostCount: number
  yearPostCount: number
  allPostCount: number
}

For "online", the hourActiveUserCount can be used

For "members" allActiveUserCount can be used