1import React, { useState, useMemo } from 'react';
2import { Grid } from 'indigo-react';
4import useBreakpoints from 'lib/useBreakpoints';
6import View from 'components/View';
7import Accordion from 'components/Accordion';
9import PrivateKey from './PrivateKey';
10import Keystore from './Keystore';
11import Ledger from './Ledger';
12import Metamask from './Metamask';
13import Trezor from './Trezor';
14import Mnemonic from './Mnemonic';
17 PRIVATE_KEY: 'PRIVATE_KEY',
26 [NAMES.PRIVATE_KEY]: PrivateKey,
27 [NAMES.KEYSTORE]: Keystore,
28 [NAMES.LEDGER]: Ledger,
29 [NAMES.TREZOR]: Trezor,
30 [NAMES.METAMASK]: Metamask,
31 [NAMES.MNEMONIC]: Mnemonic,
35 { text: 'Metamask', value: NAMES.METAMASK },
36 { text: 'Mnemonic (BIP 39)', value: NAMES.MNEMONIC },
37 { text: 'Ledger', value: NAMES.LEDGER },
38 { text: 'Trezor', value: NAMES.TREZOR },
39 { text: 'Ethereum Private Key', value: NAMES.PRIVATE_KEY },
40 { text: 'Ethereum Keystore', value: NAMES.KEYSTORE },
43const isHardware = name => !![NAMES.TREZOR, NAMES.LEDGER].find(n => n === name);
45export default function Other({ className, ...rest }) {
46 const [currentTab, setCurrentTab] = useState(undefined);
48 const hardwareAllowed = useBreakpoints([false, true, true]);
49 const options = useMemo(
54 : { ...o, disabled: !hardwareAllowed && ' not available on mobile' }
65 currentTab={currentTab}
66 onTabChange={setCurrentTab}
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