10 lines
287 B
JavaScript
10 lines
287 B
JavaScript
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;
|