mirror of
https://github.com/brunofontes/shareit.git
synced 2025-12-15 20:12:08 -03:00
feat: broadcasting item to refresh pages
This commit is contained in:
10
resources/js/pusher.js
vendored
Normal file
10
resources/js/pusher.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'https://js.pusher.com/7.2/pusher.min.js';
|
||||
var pusher = new Pusher('93b3e504421787295454', {
|
||||
cluster: 'us2'
|
||||
});
|
||||
|
||||
var channel = pusher.subscribe('touchedItem');
|
||||
channel.bind('RefreshPage', function(data) {
|
||||
window.location.reload();
|
||||
console.log(JSON.stringify(data));
|
||||
});
|
||||
Reference in New Issue
Block a user