Skip to content

Commit c7c99fa

Browse files
committed
Begin getting rid of the App component that
displays containers...
1 parent d7462d0 commit c7c99fa

File tree

1 file changed

+13
-5
lines changed
  • examples/iracing-ui/src/containers/App

1 file changed

+13
-5
lines changed
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
import React from "react";
1+
import React, { PropsWithChildren } from "react";
22
import { Provider } from "react-redux";
33
import { ChakraProvider } from "@chakra-ui/react";
44
import AppUI from "../../components/App";
55
import { IRacingSocketConnectionProvider } from "../../contexts/IRacingSocketConnection";
66
import { IRacing } from "../IRacing";
77
import { store } from "../../app/store";
88

9-
export const App: React.FC<Record<string, never>> = () => {
9+
const AppProvider: React.FC<PropsWithChildren<Record<string, unknown>>> = ({
10+
children,
11+
}) => {
1012
return (
1113
<ChakraProvider>
1214
<Provider store={store}>
1315
<IRacingSocketConnectionProvider>
14-
<IRacing>
15-
<AppUI />
16-
</IRacing>
16+
<IRacing>{children}</IRacing>
1717
</IRacingSocketConnectionProvider>
1818
</Provider>
1919
</ChakraProvider>
2020
);
2121
};
2222

23+
export const App: React.FC<Record<string, never>> = () => {
24+
return (
25+
<AppProvider>
26+
<AppUI />
27+
</AppProvider>
28+
);
29+
};
30+
2331
export default App;

0 commit comments

Comments
 (0)