pow-co / pow.co

7 stars 7 forks source link

New Live Chat Messages In Browser Should Increment Badge Number #185

Open owenkellogg opened 1 year ago

owenkellogg commented 1 year ago

When you are not in the live chat area a small number should increment in real time for each new live chat message from other players.

interface UseBitchat {
  newMessagesCount: number;
  clearNewMessages: Function;
}

let { newMessagesCount, clearNewMessages } = useBitchat()

Settings for Bitchat can also be a hook with everything contained in a BitchatContext which will automatically connect to the websocket back end and receive a stream of new chat messages.