on master help sign in
login: clean up unused imports and variables
a21a5c5pkova
src/views/Login.js+2−32
@@ -1,51 +1,21 @@
1import React, { useCallback, useState } from 'react';
1import React, { useCallback, useState } from 'react';
2−import { P, H4, H5, Grid, Text, Button, Flex, LinkButton } from 'indigo-react';
2+import { Grid, Text, Button, Flex, LinkButton } from 'indigo-react';
3
3
4import { version } from '../../package.json';
4import { version } from '../../package.json';
5
5
6import { useHistory } from 'store/history';
6import { useHistory } from 'store/history';
7−import { useWallet } from 'store/wallet';
8−import { usePointCursor } from 'store/pointCursor';
9
7
10−import { WALLET_TYPES } from 'lib/wallet';
11import { COMMANDS, useFlowCommand } from 'lib/flowCommand';
8import { COMMANDS, useFlowCommand } from 'lib/flowCommand';
12
9
13import View from 'components/View';
10import View from 'components/View';
14−import Tabs from 'components/Tabs';
15−import Crumbs from 'components/Crumbs';
16import Footer from 'components/Footer';
11import Footer from 'components/Footer';
17−import { ForwardButton, OfflineButton } from 'components/Buttons';
18
12
19import Ticket from './Login/Ticket';
13import Ticket from './Login/Ticket';
20import Other from './Login/Other';
14import Other from './Login/Other';
21
15
22−const NAMES = {
23− TICKET: 'TICKET',
24− OTHER: 'OTHER',
25−};
26−
27−const VIEWS = {
28− [NAMES.TICKET]: Ticket,
29− [NAMES.OTHER]: Other,
30−};
31−
32−const OPTIONS = [
33− { text: 'Master Ticket', value: NAMES.TICKET },
34− { text: 'Other', value: NAMES.OTHER },
35−];
36−
37−const walletTypeToViewName = walletType => {
38− if (walletType === WALLET_TYPES.TICKET || !walletType) {
39− return NAMES.TICKET;
40− }
41− return NAMES.OTHER;
42−};
43−
44export default function Login() {
16export default function Login() {
45 // globals
17 // globals
46− const { pop, push, names } = useHistory();
18+ const { push, names } = useHistory();
47− const { walletType } = useWallet();
48− const { setPointCursor } = usePointCursor();
49 const flow = useFlowCommand();
19 const flow = useFlowCommand();
50
20
51 // inputs
21 // inputs