mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-30 20:28:09 +00:00
Change folder structure of 'LeftNavigation'
This commit is contained in:
parent
f342915375
commit
8252d0908b
@ -1,4 +0,0 @@
|
||||
export { default as AccountMenu } from './AccountMenu';
|
||||
export { default as CoinMenu } from './CoinMenu';
|
||||
export { DeviceSelect } from './DeviceMenu';
|
||||
export { DeviceDropdown } from './DeviceMenu';
|
@ -13,9 +13,9 @@ import { findDeviceAccounts } from 'reducers/AccountsReducer';
|
||||
import { FONT_SIZE, BORDER_WIDTH } from 'config/variables';
|
||||
|
||||
import type { Accounts } from 'flowtype';
|
||||
import type { Props } from '../../common';
|
||||
import type { Props } from '../common';
|
||||
|
||||
import Row from '../../Row';
|
||||
import Row from '../Row';
|
||||
|
||||
const RowAccountWrapper = styled.div`
|
||||
height: 64px;
|
@ -10,8 +10,8 @@ import styled from 'styled-components';
|
||||
|
||||
import { FONT_SIZE, ICON_SIZE } from 'config/variables';
|
||||
|
||||
import Divider from '../../Divider';
|
||||
import Row from '../../Row';
|
||||
import Divider from '../Divider';
|
||||
import Row from '../Row';
|
||||
|
||||
const CoinNameWrapper = styled.div`
|
||||
display: flex;
|
@ -4,9 +4,9 @@ import TrezorConnect from 'trezor-connect';
|
||||
|
||||
import type { TrezorDevice } from 'flowtype';
|
||||
|
||||
import type { Props } from '../../common';
|
||||
import type { Props } from '../common';
|
||||
|
||||
import AsideDivider from '../../Divider';
|
||||
import AsideDivider from '../Divider';
|
||||
|
||||
export const DeviceSelect = (props: Props) => {
|
||||
const { devices } = props;
|
||||
@ -214,7 +214,7 @@ export class DeviceDropdown extends Component<Props> {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{currentDeviceMenu}
|
||||
{deviceList.length > 1 ? <AsideDivider textLeft={'Other devices'} /> : null}
|
||||
{deviceList.length > 1 ? <AsideDivider textLeft="Other devices" /> : null}
|
||||
{deviceList}
|
||||
{webUsbButton}
|
||||
</React.Fragment>
|
@ -24,8 +24,8 @@ const Divider = ({ textLeft, textRight }) => (
|
||||
);
|
||||
|
||||
Divider.propTypes = {
|
||||
textLeft: PropTypes.string.isRequired,
|
||||
textRight: PropTypes.string.isRequired,
|
||||
textLeft: PropTypes.string,
|
||||
textRight: PropTypes.string,
|
||||
};
|
||||
|
||||
export default Divider;
|
@ -4,15 +4,12 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import type { TrezorDevice } from 'flowtype';
|
||||
import {
|
||||
AccountMenu,
|
||||
CoinMenu,
|
||||
DeviceSelect,
|
||||
DeviceDropdown,
|
||||
} from './NavigationMenu';
|
||||
import StickyContainer from './StickyContainer';
|
||||
import AccountMenu from './components/AccountMenu';
|
||||
import CoinMenu from './components/CoinMenu';
|
||||
import { DeviceDropdown, DeviceSelect } from './components/DeviceMenu';
|
||||
import StickyContainer from './components/StickyContainer';
|
||||
|
||||
import type { Props } from './common';
|
||||
import type { Props } from './components/common';
|
||||
|
||||
type TransitionMenuProps = {
|
||||
animationType: string;
|
||||
@ -28,8 +25,7 @@ const TransitionContentWrapper = styled.div`
|
||||
vertical-align: top;
|
||||
`;
|
||||
|
||||
const TransitionMenu = (props: TransitionMenuProps): React$Element<TransitionGroup> => {
|
||||
return (
|
||||
const TransitionMenu = (props: TransitionMenuProps): React$Element<TransitionGroup> => (
|
||||
<TransitionGroupWrapper component="div" className="transition-container">
|
||||
<CSSTransition
|
||||
key={props.animationType}
|
||||
@ -47,7 +43,6 @@ const TransitionMenu = (props: TransitionMenuProps): React$Element<TransitionGro
|
||||
</CSSTransition>
|
||||
</TransitionGroupWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const LeftNavigation = (props: Props): React$Element<typeof StickyContainer | string> => {
|
||||
@ -56,7 +51,7 @@ const LeftNavigation = (props: Props): React$Element<typeof StickyContainer | st
|
||||
|
||||
if (location.pathname === '/' || !selected) return (<aside />);
|
||||
|
||||
let menu = <section />;
|
||||
const menu = <section />;
|
||||
|
||||
let shouldRenderDeviceSelection = false;
|
||||
// let shouldRenderCoins = false;
|
||||
|
Loading…
Reference in New Issue
Block a user