blob: 0c093a6dd19531fd88b4474ba6a3158ddadede13 (
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
37
38
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;
|