1import React, { useCallback, useState } from 'react';
2import { H4, Grid } from 'indigo-react';
4import { useHistory } from 'store/history';
5import { useWallet } from 'store/wallet';
7import { WALLET_TYPES } from 'lib/wallet';
9import View from 'components/View';
10import Tabs from 'components/Tabs';
11import Crumbs from 'components/Crumbs';
12import Footer from 'components/Footer';
13import { ForwardButton, OfflineButton } from 'components/Buttons';
15import Ticket from './Login/Ticket';
16import Other from './Login/Other';
24 [NAMES.TICKET]: Ticket,
29 { text: 'Master Ticket', value: NAMES.TICKET },
30 { text: 'Other', value: NAMES.OTHER },
33const walletTypeToViewName = walletType => {
34 if (walletType === WALLET_TYPES.TICKET || !walletType) {
40export default function Login() {
42 const { pop, push, names } = useHistory();
43 const { walletType } = useWallet();
46 const [currentTab, setCurrentTab] = useState(
47 walletTypeToViewName(walletType)
50 const goToActivate = useCallback(() => push(names.ACTIVATE), [
55 const goHome = useCallback(() => {
60 <View pop={pop} inset>
62 <Grid.Item full as={Crumbs} />
63 <Grid.Item full as={H4} className="mt4">
74 currentTab={currentTab}
75 onTabChange={setCurrentTab}
84 <Grid.Item full as={ForwardButton} onClick={goToActivate}>
88 <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