@@ -3,12 +3,20 @@ import { H1, P } from 'indigo-react';
4import { ROUTE_NAMES } from '../lib/routeNames';
4import { ROUTE_NAMES } from '../lib/routeNames';
5import { useHistory } from '../store/history';
5import { useHistory } from '../store/history';
6+import useImpliedPoint from 'lib/useImpliedPoint';
7+import useImpliedTicket from 'lib/useImpliedTicket';
7import View from 'components/View';
9import View from 'components/View';
8import { ForwardButton } from 'components/Buttons';
10import { ForwardButton } from 'components/Buttons';
10function Landing() {
12function Landing() {
11− const history = useHistory();
13+ const { push, names } = useHistory();
15+ if (useImpliedPoint()) {
17+ } else if (useImpliedTicket()) {
18+ push(names.ACTIVATE);
@@ -22,21 +30,21 @@ function Landing() {
22 <ForwardButton
30 <ForwardButton
23 className="mt3"
31 className="mt3"
24 detail="If you were sent an Azimuth invite code."
32 detail="If you were sent an Azimuth invite code."
25− onClick={() => history.push(ROUTE_NAMES.ACTIVATE)}>
33+ onClick={() => push(names.ACTIVATE)}>
26 Activate a Point
34 Activate a Point
27 </ForwardButton>
35 </ForwardButton>
29 <ForwardButton
37 <ForwardButton
30 className="mt3"
38 className="mt3"
31 detail="Login to an activated point."
39 detail="Login to an activated point."
32− onClick={() => history.push(ROUTE_NAMES.LOGIN)}>
40+ onClick={() => push(names.LOGIN)}>
34 </ForwardButton>
42 </ForwardButton>
36 <ForwardButton
44 <ForwardButton
37 className="mt3"
45 className="mt3"
38 detail="View an Azimuth point without signing into a wallet."
46 detail="View an Azimuth point without signing into a wallet."
39− onClick={() => history.push(ROUTE_NAMES.VIEW_POINT)}>
47+ onClick={() => push(names.VIEW_POINT)}>
40 View a Point
48 View a Point
41 </ForwardButton>
49 </ForwardButton>