aboutsummaryrefslogtreecommitdiff
path: root/src/shared/sidebar.hoc.js
blob: 30a18a3c810356969d48deeceec6c4b41b789959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { connect } from "react-redux";
import { compose } from "redux";
import './sidebar.css';

const Sidebar = (HocComponent) => {
    return class SidebarComponent extends Component {

        render() {
            return (
                <React.Fragment>
                    <div className="sidebar">
                        Sidebar
                    </div>
                    <div className="content">
                        <HocComponent {...this.props} />
                    </div>
                </React.Fragment>
            );
        }
    }
}


const mapStateToProps = state => {
    return {

    };
};

const WithSidebar = compose(
    connect(mapStateToProps, null),
    Sidebar
)
export default WithSidebar;