X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2FApp.js;h=f63298978de960aa1602ba08c99772e4989c9b0f;hb=2efd7613561696a3abb19ee9f42b15cf9b4058ad;hp=b5bd9c9fdfd8388d500d97f5ae8e10b9e594719b;hpb=edd0e97bfdc544114f30bf4c13a929631c44a555;p=alttp.git diff --git a/resources/js/components/App.js b/resources/js/components/App.js index b5bd9c9..f632989 100644 --- a/resources/js/components/App.js +++ b/resources/js/components/App.js @@ -37,6 +37,16 @@ const App = () => { }; }, []); + useEffect(() => { + window.Echo.channel('App.Control') + .listen('PleaseRefresh', () => { + location.reload(); + }); + return () => { + window.Echo.leave('App.Control'); + }; + }, []); + return