]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/Tournament.js
public tournament page
[alttp.git] / resources / js / components / pages / Tournament.js
index 90f7d038c3718612d5051dcf9453abbb79e14fe8..d5df3a1ca4916e4cae6a17c55df1c76babee86a0 100644 (file)
@@ -34,7 +34,7 @@ const Tournament = () => {
        }, [id]);
 
        useEffect(() => {
-               window.Echo.private(`Tournament.${id}`)
+               window.Echo.channel(`Tournament.${id}`)
                        .listen('ResultReported', e => {
                                if (e.result) {
                                        setTournament(tournament => patchResult(tournament, e.result));
@@ -44,7 +44,7 @@ const Tournament = () => {
                                if (e.round) {
                                        setTournament(tournament => ({
                                                ...tournament,
-                                               rounds: [...tournament.rounds, e.round],
+                                               rounds: [e.round, ...tournament.rounds],
                                        }));
                                }
                        })