33 lines
738 B
JavaScript
33 lines
738 B
JavaScript
import React from 'react';
|
|
import {connect} from 'react-redux';
|
|
import Datetime from 'react-datetime';
|
|
import MainMenu from '../../containers/MenuControl';
|
|
import Loading from '../../containers/LoadingControl';
|
|
import Dialog from '../DialogControl';
|
|
|
|
class AdmPage extends React.Component {
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
render() {
|
|
let {i18n, children} = this.props;
|
|
if(!i18n || Object.keys(i18n).length == 0 || !i18n.t || !i18n.getResource) return null;
|
|
return (
|
|
<div style={{height: '100%'}}>
|
|
<Loading />
|
|
<Dialog />
|
|
<MainMenu i18n={i18n} >
|
|
{children}
|
|
</MainMenu>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
|
|
const mapStateToProps = (state) => ({
|
|
i18n: state.i18n
|
|
})
|
|
|
|
export default connect(mapStateToProps)(AdmPage); |