Skip to content

Commit

Permalink
fix: filter events sent by signalr
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 2, 2022
1 parent 7df5cdf commit 3b49588
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions GZCTF/ClientApp/src/pages/games/[id]/monitor/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ const Events: FC = () => {

connection.on('ReceivedGameEvent', (message: GameEvent) => {
console.log(message)
newEvents.current = [message, ...newEvents.current]
update(new Date(message.time!))
if (!hideConatinerEvents ||
(message.type !== EventType.ContainerStart
&& message.type !== EventType.ContainerDestroy)) {
newEvents.current = [message, ...newEvents.current]
update(new Date(message.time!))
}
})

connection
Expand Down

0 comments on commit 3b49588

Please sign in to comment.