import React, { Component, Fragment } from 'react';
import { inject, observer } from "mobx-react";
import { NavBar, Icon } from 'antd-mobile';

@inject("store")
@observer
export class SecondaryLayout extends Component {
    constructor(props) {
        super(props);
        this.store = this.props.store;
    }
    goBack = () => {
        this.store.goBack();
    }
    render() {
        return (
            <Fragment>
                <NavBar icon={<Icon type="left" />}
                    onLeftClick={this.goBack}
                >
                    {this.props.navTitle}
                </NavBar>
                {this.props.children}
                {/* <WhiteSpace size='xl' />
                <WhiteSpace size='xl' />
                <WhiteSpace /> */}
                {/* <p style={{height:30}} /> */}
                {/* <Button type="primary" style={{zIndex:999, borderRadius:0, width: '100%', position:'fixed', bottom:0}}>Book Now</Button> */}
            </Fragment>
        )
    }
}

export default SecondaryLayout;
