1import React, { useCallback } from 'react';
2import { Just } from 'folktale/maybe';
3import { Input, H1, P } from 'indigo-react';
5import { useHistory } from 'store/history';
6import { usePointCursor } from 'store/pointCursor';
8import { ROUTE_NAMES } from 'lib/routeNames';
9import patp2dec from 'lib/patp2dec';
10import { usePointInput } from 'lib/useInputs';
12import View from 'components/View';
13import { ForwardButton } from 'components/Buttons';
15export default function ViewPoint() {
16 const history = useHistory();
17 const { setPointCursor } = usePointCursor();
18 const [pointInput, { data: pointName, pass }] = usePointInput({
23 const disabled = !pass;
24 const goForward = useCallback(() => {
25 setPointCursor(Just(patp2dec(pointName)));
26 history.popAndPush(ROUTE_NAMES.POINT);
27 }, [setPointCursor, history, pointName]);
33 <P>Enter a point name to view its public information.</P>
35 <Input {...pointInput} onEnter={goForward} />
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