@@ -1,7 +1,8 @@
1−import React, { useCallback, useState } from 'react';
1+import React, { useCallback, useState, useMemo } from 'react';
22import { Just, Nothing } from 'folktale/maybe';
33import * as azimuth from 'azimuth-js';
44import { H4, Grid } from 'indigo-react';
5+import { filter } from 'lodash';
56
67import { useHistory } from 'store/history';
78import { useNetwork } from 'store/network';
@@ -21,6 +22,7 @@ import Ticket from './Login/Ticket';
2122import Mnemonic from './Login/Mnemonic';
2223import Advanced from './Login/Advanced';
2324import Hardware from './Login/Hardware';
25+import useBreakpoints from 'lib/useBreakpoints';
2426
2527const NAMES = {
2628 TICKET: 'TICKET',
@@ -70,6 +72,20 @@ export default function Login() {
7072
7173 const [deducing, setDeducing] = useState(false);
7274
75+ // again, using breakpoint to decide if we're on mobile or not
76+ // see ActivateCode for more details
77+ const hardwareAllowed = useBreakpoints([false, true, true]);
78+
79+ // filter out hardware if mobile
80+ const options = useMemo(
81+ () =>
82+ filter(
83+ OPTIONS,
84+ ({ value }) => hardwareAllowed || value !== NAMES.HARDWARE
85+ ),
86+ [hardwareAllowed]
87+ );
88+
7389 // inputs
7490 const [currentTab, setCurrentTab] = useState(
7591 walletTypeToViewName(walletType)
@@ -132,7 +148,7 @@ export default function Login() {
132148 as={Tabs}
133149 className="mt1"
134150 views={VIEWS}
135− options={OPTIONS}
151+ options={options}
136152 currentTab={currentTab}
137153 onTabChange={setCurrentTab}
138154 />