11import { createSignal , Show } from "solid-js" ;
22import Streamer from "./Streamer" ;
33import Viewer from "./Viewer" ;
4- import {
5- fishjamId as configFishjamId ,
6- SANDBOX_API_URL as configSandboxApiUrl ,
7- } from "./config" ;
4+ import { SANDBOX_API_URL as configSandboxApiUrl } from "./config" ;
85
96export default function App ( ) {
107 const [ streamName , setStreamName ] = createSignal ( "my-stream" ) ;
11- const [ fishjamId , setFishjamId ] = createSignal ( configFishjamId ) ;
128 const [ sandboxApiUrl , setSandboxApiUrl ] = createSignal ( configSandboxApiUrl ) ;
139
1410 return (
@@ -33,21 +29,6 @@ export default function App() {
3329 class = "border-input bg-input/30 flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-xs outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
3430 />
3531 </ div >
36- < Show when = { ! configFishjamId } >
37- < div class = "space-y-2" >
38- < label class = "text-sm font-medium leading-none" for = "fishjam-id" >
39- Fishjam ID
40- </ label >
41- < input
42- id = "fishjam-id"
43- type = "text"
44- value = { fishjamId ( ) }
45- onInput = { ( e ) => setFishjamId ( e . currentTarget . value ) }
46- placeholder = "your-fishjam-id"
47- class = "border-input bg-input/30 flex h-9 w-full rounded-md border px-3 py-1 text-sm shadow-xs outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
48- />
49- </ div >
50- </ Show >
5132 < Show when = { ! configSandboxApiUrl } >
5233 < div class = "space-y-2" >
5334 < label
@@ -70,16 +51,8 @@ export default function App() {
7051 </ div >
7152 </ div >
7253 < div class = "mx-auto max-w-7xl grid grid-cols-1 gap-8 lg:grid-cols-2" >
73- < Streamer
74- streamName = { streamName ( ) }
75- fishjamId = { fishjamId ( ) }
76- sandboxApiUrl = { sandboxApiUrl ( ) }
77- />
78- < Viewer
79- streamName = { streamName ( ) }
80- fishjamId = { fishjamId ( ) }
81- sandboxApiUrl = { sandboxApiUrl ( ) }
82- />
54+ < Streamer streamName = { streamName ( ) } sandboxApiUrl = { sandboxApiUrl ( ) } />
55+ < Viewer streamName = { streamName ( ) } sandboxApiUrl = { sandboxApiUrl ( ) } />
8356 </ div >
8457 </ div >
8558 ) ;
0 commit comments