aboutsummaryrefslogtreecommitdiff
path: root/src/shared/header_footer.hoc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/header_footer.hoc.js')
-rw-r--r--src/shared/header_footer.hoc.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/shared/header_footer.hoc.js b/src/shared/header_footer.hoc.js
new file mode 100644
index 0000000..0c093a6
--- /dev/null
+++ b/src/shared/header_footer.hoc.js
@@ -0,0 +1,39 @@
+import React, { Component } from "react";
+import { Link } from 'react-router-dom';
+import { connect } from "react-redux";
+import { compose } from "redux";
+
+const HeaderFooter = (HocComponent) => {
+ return class HeaderFooterComponent extends Component {
+
+ render() {
+ return (
+ <React.Fragment>
+ <nav className="nav">
+ <Link className="nav-link" to={"/dashboard"} >Dashboard</Link>
+ <Link className="nav-link" to={"/superadmin"} >Superadmin</Link>
+ <Link className="nav-link" to={"/admin"} >Admin</Link>
+ <Link className="nav-link" to={"/login"} >Login</Link>
+ </nav>
+ <HocComponent {...this.props} />
+ <footer className="footer">
+ <div className="container">Footer</div>
+ </footer>
+ </React.Fragment>
+ );
+ }
+ }
+}
+
+
+const mapStateToProps = state => {
+ return {
+
+ };
+};
+
+const WithHeaderFooter = compose(
+ connect(mapStateToProps, null),
+ HeaderFooter
+)
+export default WithHeaderFooter; \ No newline at end of file