diff --git a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/index.js deleted file mode 100644 index aab425a4..00000000 --- a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { default as AccountMenu } from './AccountMenu'; -export { default as CoinMenu } from './CoinMenu'; -export { DeviceSelect } from './DeviceMenu'; -export { DeviceDropdown } from './DeviceMenu'; diff --git a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/AccountMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js similarity index 98% rename from src/js/views/Wallet/components/LeftNavigation/NavigationMenu/AccountMenu/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js index d582e18c..c8c5938a 100644 --- a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/AccountMenu/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/AccountMenu/index.js @@ -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; diff --git a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/CoinMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js similarity index 98% rename from src/js/views/Wallet/components/LeftNavigation/NavigationMenu/CoinMenu/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js index 40f257af..dc848d29 100644 --- a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/CoinMenu/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js @@ -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; diff --git a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/DeviceMenu/index.js b/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js similarity index 98% rename from src/js/views/Wallet/components/LeftNavigation/NavigationMenu/DeviceMenu/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js index 1bebe707..fb73650b 100644 --- a/src/js/views/Wallet/components/LeftNavigation/NavigationMenu/DeviceMenu/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/DeviceMenu/index.js @@ -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,10 +214,10 @@ export class DeviceDropdown extends Component { return ( {currentDeviceMenu} - {deviceList.length > 1 ? : null} + {deviceList.length > 1 ? : null} {deviceList} {webUsbButton} ); } -} \ No newline at end of file +} diff --git a/src/js/views/Wallet/components/LeftNavigation/Divider/index.js b/src/js/views/Wallet/components/LeftNavigation/components/Divider/index.js similarity index 88% rename from src/js/views/Wallet/components/LeftNavigation/Divider/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/Divider/index.js index 1673d82d..c077fc49 100644 --- a/src/js/views/Wallet/components/LeftNavigation/Divider/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/components/Divider/index.js @@ -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; diff --git a/src/js/views/Wallet/components/LeftNavigation/Row/index.js b/src/js/views/Wallet/components/LeftNavigation/components/Row/index.js similarity index 100% rename from src/js/views/Wallet/components/LeftNavigation/Row/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/Row/index.js diff --git a/src/js/views/Wallet/components/LeftNavigation/StickyContainer/index.js b/src/js/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js similarity index 100% rename from src/js/views/Wallet/components/LeftNavigation/StickyContainer/index.js rename to src/js/views/Wallet/components/LeftNavigation/components/StickyContainer/index.js diff --git a/src/js/views/Wallet/components/LeftNavigation/common.js b/src/js/views/Wallet/components/LeftNavigation/components/common.js similarity index 100% rename from src/js/views/Wallet/components/LeftNavigation/common.js rename to src/js/views/Wallet/components/LeftNavigation/components/common.js diff --git a/src/js/views/Wallet/components/LeftNavigation/index.js b/src/js/views/Wallet/components/LeftNavigation/index.js index c5f979c0..01ebae80 100644 --- a/src/js/views/Wallet/components/LeftNavigation/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/index.js @@ -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,26 +25,24 @@ const TransitionContentWrapper = styled.div` vertical-align: top; `; -const TransitionMenu = (props: TransitionMenuProps): React$Element => { - return ( - - { window.dispatchEvent(new Event('resize')); }} - onExited={() => window.dispatchEvent(new Event('resize'))} - in - out - classNames={props.animationType} - appear={false} - timeout={300} - > - - {props.children} - - - - ); -}; +const TransitionMenu = (props: TransitionMenuProps): React$Element => ( + + { window.dispatchEvent(new Event('resize')); }} + onExited={() => window.dispatchEvent(new Event('resize'))} + in + out + classNames={props.animationType} + appear={false} + timeout={300} + > + + {props.children} + + + +); const LeftNavigation = (props: Props): React$Element => { @@ -56,7 +51,7 @@ const LeftNavigation = (props: Props): React$Element); - let menu =
; + const menu =
; let shouldRenderDeviceSelection = false; // let shouldRenderCoins = false;