Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 61x 612x 612x 3x 609x | import React from "react";
import { withRouter } from "react-router-dom";
import Footer from "../Footer";
import Header from "../Header";
const Layout = (props) => {
const { children, location } = props;
if (location.pathname === '/') {
return (
<>
{children}
</>
)
}
return (
<>
<Header />
{children}
<Footer />
</>
);
};
export default withRouter(Layout);
|