@@ -3,12 +3,20 @@ import { H1, P } from 'indigo-react';
33
44import { ROUTE_NAMES } from '../lib/routeNames';
55import { useHistory } from '../store/history';
6+import useImpliedPoint from 'lib/useImpliedPoint';
7+import useImpliedTicket from 'lib/useImpliedTicket';
68
79import View from 'components/View';
810import { ForwardButton } from 'components/Buttons';
911
1012function Landing() {
11− const history = useHistory();
13+ const { push, names } = useHistory();
14+
15+ if (useImpliedPoint()) {
16+ push(names.LOGIN);
17+ } else if (useImpliedTicket()) {
18+ push(names.ACTIVATE);
19+ }
1220
1321 return (
1422 <View>
@@ -22,21 +30,21 @@ function Landing() {
2230 <ForwardButton
2331 className="mt3"
2432 detail="If you were sent an Azimuth invite code."
25− onClick={() => history.push(ROUTE_NAMES.ACTIVATE)}>
33+ onClick={() => push(names.ACTIVATE)}>
2634 Activate a Point
2735 </ForwardButton>
2836
2937 <ForwardButton
3038 className="mt3"
3139 detail="Login to an activated point."
32− onClick={() => history.push(ROUTE_NAMES.LOGIN)}>
40+ onClick={() => push(names.LOGIN)}>
3341 Login
3442 </ForwardButton>
3543
3644 <ForwardButton
3745 className="mt3"
3846 detail="View an Azimuth point without signing into a wallet."
39− onClick={() => history.push(ROUTE_NAMES.VIEW_POINT)}>
47+ onClick={() => push(names.VIEW_POINT)}>
4048 View a Point
4149 </ForwardButton>
4250 </View>