on master help sign in
Better useHistory on Landing
commitb9b21b6833b96253b9fef37b4e6f9e4f7cc04f34 authorFang <git@fang.io> dateFri 12 Jul 2019, 18:41 (7 years ago) parenta531c30
1 file changed+4−4
src/views/Landing.js+4−4
src/views/Landing.js+4−4
@@ -8,7 +8,7 @@ import View from 'components/View';
88import { ForwardButton } from 'components/Buttons';
99
1010function Landing() {
11− const history = useHistory();
11+ const { push, names } = useHistory();
1212
1313 return (
1414 <View>
@@ -22,21 +22,21 @@ function Landing() {
2222 <ForwardButton
2323 className="mt3"
2424 detail="If you were sent an Azimuth invite code."
25− onClick={() => history.push(ROUTE_NAMES.ACTIVATE)}>
25+ onClick={() => push(names.ACTIVATE)}>
2626 Activate a Point
2727 </ForwardButton>
2828
2929 <ForwardButton
3030 className="mt3"
3131 detail="Login to an activated point."
32− onClick={() => history.push(ROUTE_NAMES.LOGIN)}>
32+ onClick={() => push(names.LOGIN)}>
3333 Login
3434 </ForwardButton>
3535
3636 <ForwardButton
3737 className="mt3"
3838 detail="View an Azimuth point without signing into a wallet."
39− onClick={() => history.push(ROUTE_NAMES.VIEW_POINT)}>
39+ onClick={() => push(names.VIEW_POINT)}>
4040 View a Point
4141 </ForwardButton>
4242 </View>