@@ -7,9 +7,7 @@ import type { CaptureSource } from '@pairux/shared-types';
77import type { DisplayServer } from '../preload/api' ;
88
99function App ( ) {
10- const [ selectedSource , setSelectedSource ] = useState < CaptureSource | null > (
11- null
12- ) ;
10+ const [ selectedSource , setSelectedSource ] = useState < CaptureSource | null > ( null ) ;
1311 const [ stream , setStream ] = useState < MediaStream | null > ( null ) ;
1412 const [ error , setError ] = useState < string | null > ( null ) ;
1513 const [ displayServer , setDisplayServer ] = useState < DisplayServer > ( 'x11' ) ;
@@ -32,7 +30,9 @@ function App() {
3230 try {
3331 // Stop existing stream
3432 if ( stream ) {
35- stream . getTracks ( ) . forEach ( ( track ) => { track . stop ( ) ; } ) ;
33+ stream . getTracks ( ) . forEach ( ( track ) => {
34+ track . stop ( ) ;
35+ } ) ;
3636 }
3737
3838 console . log ( '[Renderer] Starting capture for source:' , source . id ) ;
@@ -81,7 +81,9 @@ function App() {
8181
8282 try {
8383 if ( stream ) {
84- stream . getTracks ( ) . forEach ( ( track ) => { track . stop ( ) ; } ) ;
84+ stream . getTracks ( ) . forEach ( ( track ) => {
85+ track . stop ( ) ;
86+ } ) ;
8587 }
8688
8789 console . log ( '[Renderer] Starting Wayland capture with system picker' ) ;
@@ -113,7 +115,9 @@ function App() {
113115
114116 const handleStopCapture = ( ) => {
115117 if ( stream ) {
116- stream . getTracks ( ) . forEach ( ( track ) => { track . stop ( ) ; } ) ;
118+ stream . getTracks ( ) . forEach ( ( track ) => {
119+ track . stop ( ) ;
120+ } ) ;
117121 setStream ( null ) ;
118122 setSelectedSource ( null ) ;
119123 }
@@ -127,7 +131,9 @@ function App() {
127131 < div className = "mb-4 rounded-lg bg-destructive/10 p-4 text-destructive" >
128132 { error }
129133 < button
130- onClick = { ( ) => { setError ( null ) ; } }
134+ onClick = { ( ) => {
135+ setError ( null ) ;
136+ } }
131137 className = "ml-4 text-sm underline"
132138 >
133139 Dismiss
@@ -137,33 +143,33 @@ function App() {
137143
138144 { ! stream ? (
139145 < >
140- < h1 className = "mb-6 text-2xl font-semibold" >
141- Select a screen or window to share
142- </ h1 >
146+ < h1 className = "mb-6 text-2xl font-semibold" > Select a screen or window to share</ h1 >
143147
144148 { isWayland && (
145149 < div className = "mb-6 rounded-lg bg-muted p-4" >
146150 < p className = "mb-3 text-sm text-muted-foreground" >
147- You're using Wayland. Click below to open the system screen
148- picker, or select a source from the list.
151+ You're using Wayland. Click below to open the system screen picker, or select
152+ a source from the list.
149153 </ p >
150154 < button
151- onClick = { ( ) => { void handleWaylandCapture ( ) ; } }
155+ onClick = { ( ) => {
156+ void handleWaylandCapture ( ) ;
157+ } }
152158 className = "rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90"
153159 >
154160 Open System Screen Picker
155161 </ button >
156162 </ div >
157163 ) }
158164
159- < SourcePicker onSelect = { ( source ) => { void handleSourceSelect ( source ) ; } } />
165+ < SourcePicker
166+ onSelect = { ( source ) => {
167+ void handleSourceSelect ( source ) ;
168+ } }
169+ />
160170 </ >
161171 ) : (
162- < CapturePreview
163- stream = { stream }
164- source = { selectedSource }
165- onStop = { handleStopCapture }
166- />
172+ < CapturePreview stream = { stream } source = { selectedSource } onStop = { handleStopCapture } />
167173 ) }
168174 </ main >
169175 </ div >
0 commit comments