ask for updates on route changes
This commit is contained in:
1 parent
0e785e0c8c
commit
43173a833d
2 files changed
+5
No files matched your search
@@ -33,6 +33,8 @@ const Main = () => {
|
||||
const { ws } = store.getState();
|
||||
if (!ws) return null;
|
||||
if (e.url === '/acp') return ws.sendAcpOffers();
|
||||
if (e.url === '/') return ws.sendOffers();
|
||||
if (e.url === '/list') return ws.sendWants();
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { wantsState, wsState, userState, offersState, acpOffersState } from './store'
|
||||
|
||||
import * as toast from './toast';
|
||||
|
||||
const SOCKET_URL = `${window.location.protocol === 'https:' ? 'wss://' : 'ws://'}${window.location.host}/api/ws`;
|
||||
|
||||
export default function createSocket(dispatch) {
|
||||
@@ -155,6 +157,7 @@ export default function createSocket(dispatch) {
|
||||
sendWantRm,
|
||||
|
||||
sendOffers,
|
||||
sendWants,
|
||||
|
||||
sendAcpOffers,
|
||||
sendAcpOfferStatusSet,
|
||||
|
||||
Reference in new issue
Block a user