File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import { AppContext } from "~/components/TreeGround";
17
17
import { getBaseName , sendMsgToServer } from "~/utils" ;
18
18
19
19
const Nav : Component < {
20
- ws : Accessor < WebSocket | null > ;
21
20
grammars : Accessor < TsGrammar [ ] > ;
22
21
setGrammars : Setter < TsGrammar [ ] > ;
23
22
selectedGrammar : Accessor < string | undefined > ;
@@ -41,7 +40,7 @@ const Nav: Component<{
41
40
e . preventDefault ( ) ;
42
41
const inputGrmr = inputGrammar ( ) ;
43
42
if ( inputGrmr ) {
44
- const socket = props . ws ( ) ;
43
+ const socket = ctx . ws ( ) ;
45
44
if ( socket ) {
46
45
sendMsgToServer ( socket , {
47
46
type : "add" ,
@@ -63,7 +62,7 @@ const Nav: Component<{
63
62
64
63
const removeGrammar = ( e : Event ) => {
65
64
e . preventDefault ( ) ;
66
- const socket = props . ws ( ) ;
65
+ const socket = ctx . ws ( ) ;
67
66
const selectedGrmr = props . selectedGrammar ( ) ;
68
67
if ( socket && selectedGrmr ) {
69
68
sendMsgToServer ( socket , {
Original file line number Diff line number Diff line change @@ -169,7 +169,6 @@ function App() {
169
169
< AppContext . Provider value = { { modal, setModal, ws } } >
170
170
< div class = "p-2" >
171
171
< Nav
172
- ws = { ws }
173
172
grammars = { grammars }
174
173
setGrammars = { setGrammars }
175
174
selectedGrammar = { selectedGrammar }
You can’t perform that action at this time.
0 commit comments