File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
examples/iracing-ui/src/containers/App Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
- import React from "react" ;
1
+ import React , { PropsWithChildren } from "react" ;
2
2
import { Provider } from "react-redux" ;
3
3
import { ChakraProvider } from "@chakra-ui/react" ;
4
4
import AppUI from "../../components/App" ;
5
5
import { IRacingSocketConnectionProvider } from "../../contexts/IRacingSocketConnection" ;
6
6
import { IRacing } from "../IRacing" ;
7
7
import { store } from "../../app/store" ;
8
8
9
- export const App : React . FC < Record < string , never > > = ( ) => {
9
+ const AppProvider : React . FC < PropsWithChildren < Record < string , unknown > > > = ( {
10
+ children,
11
+ } ) => {
10
12
return (
11
13
< ChakraProvider >
12
14
< Provider store = { store } >
13
15
< IRacingSocketConnectionProvider >
14
- < IRacing >
15
- < AppUI />
16
- </ IRacing >
16
+ < IRacing > { children } </ IRacing >
17
17
</ IRacingSocketConnectionProvider >
18
18
</ Provider >
19
19
</ ChakraProvider >
20
20
) ;
21
21
} ;
22
22
23
+ export const App : React . FC < Record < string , never > > = ( ) => {
24
+ return (
25
+ < AppProvider >
26
+ < AppUI />
27
+ </ AppProvider >
28
+ ) ;
29
+ } ;
30
+
23
31
export default App ;
You can’t perform that action at this time.
0 commit comments