aboutsummaryrefslogtreecommitdiff
path: root/src/shared/sidebar.hoc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/sidebar.hoc.js')
-rw-r--r--src/shared/sidebar.hoc.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/shared/sidebar.hoc.js b/src/shared/sidebar.hoc.js
new file mode 100644
index 0000000..30a18a3
--- /dev/null
+++ b/src/shared/sidebar.hoc.js
@@ -0,0 +1,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; \ No newline at end of file