|
|
@ -74,21 +74,17 @@ class WrappedRoute extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function columnClass(columns) {
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
switch (columns) {
|
|
|
|
layout: state.getIn(['settings', 'layout']),
|
|
|
|
case "auto": return "auto-columns";
|
|
|
|
});
|
|
|
|
case "single": return "single-column";
|
|
|
|
|
|
|
|
case "multiple": return "multi-columns";
|
|
|
|
|
|
|
|
default: return "auto-columns";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@connect()
|
|
|
|
@connect(mapStateToProps)
|
|
|
|
export default class UI extends React.PureComponent {
|
|
|
|
export default class UI extends React.PureComponent {
|
|
|
|
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
static propTypes = {
|
|
|
|
dispatch: PropTypes.func.isRequired,
|
|
|
|
dispatch: PropTypes.func.isRequired,
|
|
|
|
children: PropTypes.node,
|
|
|
|
children: PropTypes.node,
|
|
|
|
|
|
|
|
layout: PropTypes.string,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
state = {
|
|
|
|
state = {
|
|
|
@ -184,15 +180,24 @@ export default class UI extends React.PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
const { width, draggingOver } = this.state;
|
|
|
|
const { width, draggingOver, layout } = this.state;
|
|
|
|
const { children } = this.props;
|
|
|
|
const { children } = this.props;
|
|
|
|
|
|
|
|
|
|
|
|
const columns = "auto";
|
|
|
|
const columnsClass = layout => {
|
|
|
|
|
|
|
|
switch (layout) {
|
|
|
|
|
|
|
|
case 'single':
|
|
|
|
|
|
|
|
return 'single-column';
|
|
|
|
|
|
|
|
case 'multiple':
|
|
|
|
|
|
|
|
return 'multiple-columns';
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return 'auto-columns';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className={'ui ' + columnClass(columns)} ref={this.setRef}>
|
|
|
|
<div className={'ui ' + columnsClass(layout)} ref={this.setRef}>
|
|
|
|
<TabsBar />
|
|
|
|
<TabsBar />
|
|
|
|
<ColumnsAreaContainer singleColumn={isMobile(width, columns)}>
|
|
|
|
<ColumnsAreaContainer singleColumn={isMobile(width, layout)}>
|
|
|
|
<WrappedSwitch>
|
|
|
|
<WrappedSwitch>
|
|
|
|
<Redirect from='/' to='/getting-started' exact />
|
|
|
|
<Redirect from='/' to='/getting-started' exact />
|
|
|
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
|
|
|
<WrappedRoute path='/getting-started' component={GettingStarted} content={children} />
|
|
|
|