mirror of
https://github.com/TheGreyDiamond/Enlight.git
synced 2026-03-31 23:00:24 +02:00
init
This commit is contained in:
10
enlightApp/app/containers/App.tsx
Normal file
10
enlightApp/app/containers/App.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export default function App(props: Props) {
|
||||
const { children } = props;
|
||||
return <>{children}</>;
|
||||
}
|
||||
6
enlightApp/app/containers/CounterPage.tsx
Normal file
6
enlightApp/app/containers/CounterPage.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import React from 'react';
|
||||
import Counter from '../features/counter/Counter';
|
||||
|
||||
export default function CounterPage() {
|
||||
return <Counter />;
|
||||
}
|
||||
6
enlightApp/app/containers/HomePage.tsx
Normal file
6
enlightApp/app/containers/HomePage.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import React from 'react';
|
||||
import Home from '../components/Home';
|
||||
|
||||
export default function HomePage() {
|
||||
return <Home />;
|
||||
}
|
||||
22
enlightApp/app/containers/Root.tsx
Normal file
22
enlightApp/app/containers/Root.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { ConnectedRouter } from 'connected-react-router';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { History } from 'history';
|
||||
import { Store } from '../store';
|
||||
import Routes from '../Routes';
|
||||
|
||||
type Props = {
|
||||
store: Store;
|
||||
history: History;
|
||||
};
|
||||
|
||||
const Root = ({ store, history }: Props) => (
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
<Routes />
|
||||
</ConnectedRouter>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
export default hot(Root);
|
||||
Reference in New Issue
Block a user