on a2a5eed help sign in
bridge/src/views/Admin.js
57 lines 1.6 kB history raw
1import React, { useCallback } from 'react';
2import * as need from 'lib/need';
3import { Grid } from 'indigo-react';
5import { usePointCursor } from 'store/pointCursor';
6// import { usePointCache } from 'store/pointCache';
8import View from 'components/View';
9import Passport from 'components/Passport';
10import { ForwardButton } from 'components/Buttons';
12import useInvites from 'lib/useInvites';
13import { ROUTE_NAMES } from 'lib/routeNames';
15import { useHistory } from 'store/history';
16import FooterButton from 'components/FooterButton';
18export default function Admin() {
19 const history = useHistory();
20 const { pointCursor } = usePointCursor();
21 // const { pointCache } = usePointCache();
23 const point = need.pointCursor(pointCursor);
25 // fetch the invites for the current cursor
26 const { availableInvites } = useInvites(point);
28 const goReticket = useCallback(() => history.push(ROUTE_NAMES.RETICKET), [
29 history,
30 ]);
32 // const pointDetails = need.fromPointCache(pointCache, point);
34 return (
35 <View>
36 <Grid className="pt2">
37 <Grid.Item full>
38 //TODO "Set Keys" when unset?
39 <ForwardButton detail="Configure public keys">
40 Edit Keys
41 </ForwardButton>
42 </Grid.Item>
43 <Grid.Divider />
44 <Grid.Item full>
45 //TODO disable if not logged in as owner
46 <ForwardButton detail="Get a new master ticket" onClick={goReticket}>
47 Reticket
48 </ForwardButton>
49 </Grid.Item>
50 </Grid>
52 <FooterButton detail="Transfer this identity to a new owner" disabled>
53 Transfer
54 </FooterButton>
55 </View>
56 );