@@ -4,6 +4,7 @@ import * as need from 'lib/need';
44import { Grid } from 'indigo-react';
55
66import { usePointCursor } from 'store/pointCursor';
7+import { usePointCache } from 'store/pointCache';
78import { useHistory } from 'store/history';
89
910import View from 'components/View';
@@ -22,9 +23,11 @@ import { useWallet } from 'store/wallet';
2223export default function Point() {
2324 const history = useHistory();
2425 const { pointCursor } = usePointCursor();
26+ const { pointCache } = usePointCache();
2527 const { wallet } = useWallet();
2628
2729 const point = need.point(pointCursor);
30+ const hasInCache = point in pointCache;
2831
2932 // fetch the invites for the current cursor
3033 const { availableInvites } = useInvites(point);
@@ -46,7 +49,9 @@ export default function Point() {
4649 <Passport point={Maybe.Just(point)} />
4750 <Grid className="pt2">
4851 <Grid.Item full>
49− <ForwardButton onClick={goAdmin}>Admin</ForwardButton>
52+ <ForwardButton disabled={!hasInCache} onClick={goAdmin}>
53+ Admin
54+ </ForwardButton>
5055 </Grid.Item>
5156 <Grid.Divider />
5257 <Grid.Item full>