2019-09-02 14:32:57 +02:00
|
|
|
import * as React from 'react';
|
2019-09-11 18:30:59 +02:00
|
|
|
import { Provider } from 'react-redux';
|
2019-09-02 14:32:57 +02:00
|
|
|
|
2019-09-11 18:30:59 +02:00
|
|
|
import Board from '../../containers/Board';
|
2019-09-14 12:42:30 +02:00
|
|
|
import createStoreHelper from '../../helpers/createStore';
|
2019-09-02 14:32:57 +02:00
|
|
|
|
2019-09-14 12:42:30 +02:00
|
|
|
import IBoard from '../../interfaces/IBoard';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
board: IBoard;
|
|
|
|
|
isLoggedIn: boolean;
|
|
|
|
|
authenticityToken: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class BoardRoot extends React.Component<Props> {
|
|
|
|
|
store: any;
|
|
|
|
|
|
2019-09-26 11:00:32 +02:00
|
|
|
constructor(props: Props) {
|
2019-09-14 12:42:30 +02:00
|
|
|
super(props);
|
|
|
|
|
|
|
|
|
|
this.store = createStoreHelper();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const { board, isLoggedIn, authenticityToken } = this.props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Provider store={this.store}>
|
|
|
|
|
<Board
|
|
|
|
|
board={board}
|
|
|
|
|
isLoggedIn={isLoggedIn}
|
|
|
|
|
authenticityToken={authenticityToken}
|
|
|
|
|
/>
|
|
|
|
|
</Provider>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-09-11 18:30:59 +02:00
|
|
|
|
|
|
|
|
export default BoardRoot;
|