Skip to content

Commit dd308a5

Browse files
author
mattfreire
committed
added Hoc
1 parent 701d45b commit dd308a5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/hoc/hoc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const Hoc = props => props.children;
2+
3+
export default Hoc;

src/routes.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import React from "react";
22
import { Route } from "react-router-dom";
3+
import Hoc from "./hoc/hoc";
34

45
import Login from "./containers/Login";
56
import Signup from "./containers/Signup";
67

78
const BaseRouter = () => (
8-
<div>
9+
<Hoc>
910
<Route exact path="/login/" component={Login} />
1011
<Route exact path="/signup/" component={Signup} />
11-
</div>
12+
</Hoc>
1213
);
1314

1415
export default BaseRouter;

0 commit comments

Comments
 (0)