1import React, { useCallback } from 'react';
2import * as need from 'lib/need';
3import { Grid } from 'indigo-react';
5import { usePointCursor } from 'store/pointCursor';
6import { useHistory } from 'store/history';
8import View from 'components/View';
9import Passport from 'components/Passport';
10import { ForwardButton } from 'components/Buttons';
11import FooterButton from 'components/FooterButton';
12import { matchBlinky } from 'components/Blinky';
14import useInvites from 'lib/useInvites';
15import { useSyncOwnedPoints } from 'lib/useSyncPoints';
16import { ROUTE_NAMES } from 'lib/routeNames';
18import Actions from './Point/Actions';
20export default function Point() {
21 const history = useHistory();
22 const { pointCursor } = usePointCursor();
23 // const { pointCache } = usePointCache();
25 const point = need.pointCursor(pointCursor);
27 // fetch the invites for the current cursor
28 const { availableInvites } = useInvites(point);
29 const availableInvitesText = matchBlinky(availableInvites);
31 const goInvite = useCallback(() => history.push(ROUTE_NAMES.INVITE), [
35 // sync the current cursor
36 useSyncOwnedPoints([point]);
40 <Passport point={point} />
41 <Grid className="pt2">
43 <ForwardButton disabled>Admin</ForwardButton>
47 <ForwardButton detail="Boot your computer" disabled>
56 <FooterButton onClick={goInvite}>
57 Invite <sup>{availableInvitesText}</sup>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list