1import React, { useCallback, useState } from 'react';
2import { P, H4, Grid } from 'indigo-react';
4import { version } from '../../package.json';
6import { useHistory } from 'store/history';
7import { useWallet } from 'store/wallet';
9import { WALLET_TYPES } from 'lib/wallet';
11import View from 'components/View';
12import Tabs from 'components/Tabs';
13import Crumbs from 'components/Crumbs';
14import Footer from 'components/Footer';
15import { ForwardButton, OfflineButton } from 'components/Buttons';
17import Ticket from './Login/Ticket';
18import Other from './Login/Other';
26 [NAMES.TICKET]: Ticket,
31 { text: 'Master Ticket', value: NAMES.TICKET },
32 { text: 'Other', value: NAMES.OTHER },
35const walletTypeToViewName = walletType => {
36 if (walletType === WALLET_TYPES.TICKET || !walletType) {
42export default function Login() {
44 const { pop, push, names } = useHistory();
45 const { walletType } = useWallet();
48 const [currentTab, setCurrentTab] = useState(
49 walletTypeToViewName(walletType)
52 const goToActivate = useCallback(() => push(names.ACTIVATE), [
57 const goHome = useCallback(() => {
62 <View pop={pop} inset>
64 <Grid.Item full as={Crumbs} routes={[{ text: 'Bridge' }]} />
65 <Grid.Item full as={H4} className="mt4">
76 currentTab={currentTab}
77 onTabChange={setCurrentTab}
81 <Grid.Item full as={P} className="f6">
89 <Grid.Item full as={ForwardButton} onClick={goToActivate}>
93 <Grid.Item full as={OfflineButton} />
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