summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/actioncable_consumer.js
blob: aeb61e61a3d029bf473226d313f613629101eb49 (plain)
1
2
3
4
5
6
7
8
9
10
import { createConsumer } from '@rails/actioncable';
import ConnectionMonitor from './actioncable_connection_monitor';

const consumer = createConsumer();

if (consumer.connection) {
  consumer.connection.monitor = new ConnectionMonitor(consumer.connection);
}

export default consumer;