@@ -50,6 +50,7 @@ import { PluginRoutes } from "./plugins";
50
50
// import plugin_api to run code
51
51
import "./pluginApi" ;
52
52
import { ConnectionMonitor } from "./ConnectionMonitor" ;
53
+ import { PatchFunction } from "./patch" ;
53
54
54
55
const Performers = lazyComponent (
55
56
( ) => import ( "./components/Performers/Performers" )
@@ -144,6 +145,13 @@ function sortPlugins(plugins: PluginList) {
144
145
return sorted ;
145
146
}
146
147
148
+ const AppContainer : React . FC < React . PropsWithChildren < { } > > = PatchFunction (
149
+ "App" ,
150
+ ( props : React . PropsWithChildren < { } > ) => {
151
+ return < > { props . children } </ > ;
152
+ }
153
+ ) as React . FC ;
154
+
147
155
export const App : React . FC = ( ) => {
148
156
const config = useConfiguration ( ) ;
149
157
const [ saveUI ] = useConfigureUI ( ) ;
@@ -357,41 +365,43 @@ export const App: React.FC = () => {
357
365
const titleProps = makeTitleProps ( ) ;
358
366
359
367
return (
360
- < ErrorBoundary >
361
- { messages ? (
362
- < IntlProvider
363
- locale = { language }
364
- messages = { messages }
365
- formats = { intlFormats }
366
- >
367
- < ConfigurationProvider
368
- configuration = { config . data ?. configuration }
369
- loading = { config . loading }
368
+ < AppContainer >
369
+ < ErrorBoundary >
370
+ { messages ? (
371
+ < IntlProvider
372
+ locale = { language }
373
+ messages = { messages }
374
+ formats = { intlFormats }
370
375
>
371
- { maybeRenderReleaseNotes ( ) }
372
- < ToastProvider >
373
- < ConnectionMonitor />
374
- < Suspense fallback = { < LoadingIndicator /> } >
375
- < LightboxProvider >
376
- < ManualProvider >
377
- < InteractiveProvider >
378
- < Helmet { ...titleProps } />
379
- { maybeRenderNavbar ( ) }
380
- < div
381
- className = { `main container-fluid ${
382
- appleRendering ? "apple" : ""
383
- } `}
384
- >
385
- { renderContent ( ) }
386
- </ div >
387
- </ InteractiveProvider >
388
- </ ManualProvider >
389
- </ LightboxProvider >
390
- </ Suspense >
391
- </ ToastProvider >
392
- </ ConfigurationProvider >
393
- </ IntlProvider >
394
- ) : null }
395
- </ ErrorBoundary >
376
+ < ConfigurationProvider
377
+ configuration = { config . data ?. configuration }
378
+ loading = { config . loading }
379
+ >
380
+ { maybeRenderReleaseNotes ( ) }
381
+ < ToastProvider >
382
+ < ConnectionMonitor />
383
+ < Suspense fallback = { < LoadingIndicator /> } >
384
+ < LightboxProvider >
385
+ < ManualProvider >
386
+ < InteractiveProvider >
387
+ < Helmet { ...titleProps } />
388
+ { maybeRenderNavbar ( ) }
389
+ < div
390
+ className = { `main container-fluid ${
391
+ appleRendering ? "apple" : ""
392
+ } `}
393
+ >
394
+ { renderContent ( ) }
395
+ </ div >
396
+ </ InteractiveProvider >
397
+ </ ManualProvider >
398
+ </ LightboxProvider >
399
+ </ Suspense >
400
+ </ ToastProvider >
401
+ </ ConfigurationProvider >
402
+ </ IntlProvider >
403
+ ) : null }
404
+ </ ErrorBoundary >
405
+ </ AppContainer >
396
406
) ;
397
407
} ;
0 commit comments