@@ -45,16 +45,6 @@ const PrivateRoute = ({ component: Component, ...rest }) => (
45
45
import { io } from 'socket.io-client'
46
46
import { toggleDarkMode } from './redux/reducers/slice/darkModeSlice'
47
47
48
- < << << << HEAD
49
- // in dev environment
50
- // const socket = io('http://localhost:5656', {
51
- // transports: ['websocket']
52
- // });
53
-
54
- // in docker container
55
- const socket = io ( `http://${ window . location . hostname } :5656` , {
56
- transports : [ 'websocket' ] ,
57
- === === =
58
48
import { allCooperativeState } from './redux/reducers/slice/appStateSlice.ts'
59
49
import { codePreviewCooperative } from './redux/reducers/slice/codePreviewSlice' ;
60
50
import { allContextCooperative } from './redux/reducers/slice/contextReducer' ;
@@ -63,7 +53,6 @@ import { cooperativeStyle } from './redux/reducers/slice/styleSlice';
63
53
64
54
const socket = io ( 'http://localhost:5656' , {
65
55
transports : [ 'websocket' ]
66
- >>> > >>> dev
67
56
} ) ;
68
57
69
58
socket . on ( 'connect' , ( ) => {
@@ -100,19 +89,10 @@ socket.on('receive message', (event) => {
100
89
} else if ( currentStore . styleSlice !== event . styleSlice ) {
101
90
store . dispatch ( cooperativeStyle ( event . styleSlice ) )
102
91
}
103
- < << << << HEAD
104
-
105
- console . log ( "eventstate from precooperative" , event . appState . components [ 0 ] . children [ 1 ] )
106
- const { type, typeId, childId} = event . appState . components [ 0 ] . children [ 1 ]
107
- store . dispatch ( addChild ( { type, typeId, childId} ) )
108
-
109
-
110
- === = ===
111
92
// else {
112
93
// console.log('contextslice else if block is running: ', event.contextSlice.allContext[lastIndex])
113
94
// store.dispatch(allContextCooperative(event.contextSlice))
114
95
// }
115
- >>> > >>> 41e7144 c6d708703d21ec0f269f012deb75d4aaf
116
96
}
117
97
console . log ( 'updated user Store from another user: ' , store . getState ( ) )
118
98
} )
0 commit comments