@@ -6,11 +6,14 @@ import Store from "../../store"
6
6
import Scoreboard from "../../model/Scoreboard"
7
7
8
8
import * as fa from "@fortawesome/free-solid-svg-icons"
9
- import { Row , Col } from "react-bootstrap"
9
+ import { Row , Col , Form } from "react-bootstrap"
10
10
import Commentator from "../../model/Commentator"
11
11
import SetComponent from "./SetComponent"
12
12
13
+ import { useStore } from "laco-react"
14
+
13
15
export default function Meta ( ) {
16
+ const scoreboard : Scoreboard = useStore ( Store )
14
17
15
18
const switchAll = ( ) => {
16
19
Store . set ( ( state : Scoreboard ) => {
@@ -42,6 +45,20 @@ export default function Meta() {
42
45
} )
43
46
}
44
47
48
+ const changeTitle = ( { target} ) => {
49
+ Store . set ( ( state : Scoreboard ) => {
50
+ state . title = target . value
51
+ return state
52
+ } )
53
+ }
54
+
55
+ const changeBracketURL = ( { target} ) => {
56
+ Store . set ( ( state : Scoreboard ) => {
57
+ state . bracketURL = target . value
58
+ return state
59
+ } )
60
+ }
61
+
45
62
return (
46
63
< Fragment >
47
64
< Row >
@@ -71,6 +88,20 @@ export default function Meta() {
71
88
< Col >
72
89
< CommentatorInfo slot = { 1 } />
73
90
</ Col >
91
+ < Col xs = { 3 } >
92
+ < Form . Control
93
+ size = "sm"
94
+ placeholder = "Stream Title"
95
+ value = { scoreboard . title }
96
+ onChange = { changeTitle }
97
+ />
98
+ < Form . Control
99
+ size = "sm"
100
+ placeholder = "Bracket URL"
101
+ value = { scoreboard . bracketURL }
102
+ onChange = { changeBracketURL }
103
+ />
104
+ </ Col >
74
105
</ Row >
75
106
</ Fragment >
76
107
)
0 commit comments