1import React, { useEffect } from 'react';
3import useRouter from 'lib/useRouter';
4import { LocalRouterProvider } from 'lib/LocalRouter';
5import { useSyncKnownPoints } from 'lib/useSyncPoints';
7import { ActivateFlowProvider } from './Activate/ActivateFlow';
8import useActivateFlowState from './Activate/useActivateFlowState';
9import ActivateCode from './Activate/ActivateCode';
10import ActivatePassport from './Activate/ActivatePassport';
11import Disclaimer from './Disclaimer';
15 DISCLAIMER: 'DISCLAIMER',
20 [NAMES.CODE]: ActivateCode,
21 [NAMES.PASSPORT]: ActivatePassport,
22 [NAMES.DISCLAIMER]: Disclaimer,
25export default function Activate() {
26 const state = useActivateFlowState();
27 const { Route, ...router } = useRouter({
30 initialRoutes: [{ key: NAMES.CODE }],
34 // remove potential /activate path on unmount
36 window.history.replaceState(null, null, '');
40 // when we know the derived point, ensure we have the data to display it
42 [state.derivedPoint.getOrElse(null)].filter(p => p !== null)
46 <LocalRouterProvider value={router}>
47 <ActivateFlowProvider value={state}>
49 </ActivateFlowProvider>
50 </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