2020-05-04 08:09:46 -04:00
|
|
|
import { createConsumer } from '@rails/actioncable';
|
2021-02-11 07:08:52 -05:00
|
|
|
import ConnectionMonitor from './actioncable_connection_monitor';
|
2020-05-04 08:09:46 -04:00
|
|
|
|
2021-02-11 07:08:52 -05:00
|
|
|
const consumer = createConsumer();
|
|
|
|
|
|
|
|
if (consumer.connection) {
|
|
|
|
consumer.connection.monitor = new ConnectionMonitor(consumer.connection);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default consumer;
|