* Adds Actions, Redicers and Middlewares * Adds Http Service * Adds Cancel option for Http Service * Adds HOC's for API Loader, Sidebar and Headers * Adds Random key generator for Routes
36 lines
814 B
JavaScript
36 lines
814 B
JavaScript
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; |