1import React, { useState } from 'react';
2import { size } from 'lodash';
3import * as need from 'lib/need';
4import ob from 'urbit-ob';
5import { Just, Nothing } from 'folktale/maybe';
6import { Grid } from 'indigo-react';
8import { usePointCursor } from 'store/pointCursor';
9// import { usePointCache } from 'store/pointCache';
11import View from 'components/View';
12import MiniBackButton from 'components/MiniBackButton';
13import { LocalRouterProvider } from 'lib/LocalRouter';
14import Crumbs from 'components/Crumbs';
16import useRouter from 'lib/useRouter';
18import { useHistory } from 'store/history';
20import Confirm from './Reticket/Confirm';
21import Download from './Reticket/Download';
22import Verify from './Reticket/Verify';
23import DoReticket from './Reticket/DoReticket';
39const STEP_MAX = size(STEP_NAMES);
41export default function Reticket() {
42 const history = useHistory();
43 const { Route, ...innerRouter } = useRouter({
46 initialRoutes: [{ key: STEP_NAMES.CONFIRM }],
48 const { pointCursor } = usePointCursor();
49 const point = need.point(pointCursor);
50 const name = ob.patp(point);
52 const [newWallet, setNewWallet] = useState(Nothing());
54 //TODO step # from Route?
57 const storeNewWallet = (wallet, paper) => {
66 const completed = () => {
71 <LocalRouterProvider value={innerRouter}>
84 action: () => history.pop(),
88 <MiniBackButton onClick={innerRouter.pop} />
89 Step {stepNumber} of {STEP_MAX}
91 STEP_NAMES={STEP_NAMES}
94 storeNewWallet={storeNewWallet}
99 </LocalRouterProvider>
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