1import React, { useCallback } from 'react';
2import { Just } from 'folktale/maybe';
3import { Input, Grid, Text } from 'indigo-react';
5import { useHistory } from 'store/history';
6import { usePointCursor } from 'store/pointCursor';
8import patp2dec from 'lib/patp2dec';
9import { usePointInput } from 'lib/useInputs';
11import View from 'components/View';
12import { ForwardButton } from 'components/Buttons';
13import ViewHeader from 'components/ViewHeader';
15export default function ViewPoint() {
16 const { pop, popAndPush, names } = 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 popAndPush(names.POINT);
27 }, [setPointCursor, pointName, popAndPush, names.POINT]);
30 <View pop={pop} inset>
32 <Grid.Item full as={ViewHeader}>
36 <Grid.Item full as={Text}>
37 Enter a point name to view its public information.
40 <Grid.Item full as={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