diff --git a/package.json b/package.json index 8a93cf8a..4001c4d8 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "trezor-connect": "5.0.30", "web3": "^0.19.0", "webpack": "^4.16.3", + "webpack-bundle-analyzer": "^2.13.1", "whatwg-fetch": "^2.0.4", "yarn-run-all": "^3.1.1" }, @@ -96,7 +97,6 @@ "stylelint-custom-processor-loader": "^0.5.0", "stylelint-processor-styled-components": "^1.3.2", "stylelint-webpack-plugin": "^0.10.5", - "webpack-bundle-analyzer": "^2.13.1", "webpack-cli": "^2.1.3", "webpack-dev-server": "^3.1.4", "yargs": "11.0.0" diff --git a/src/support/PropTypes.js b/src/support/PropTypes.js new file mode 100644 index 00000000..86ac37a0 --- /dev/null +++ b/src/support/PropTypes.js @@ -0,0 +1,7 @@ +import PropTypes from 'prop-types'; + +export const DEVICE_PROP_TYPES = PropTypes.shape({ + id: PropTypes.number.isRequired, + text: PropTypes.string.isRequired, + author: authorPropType.isRequired, +}); \ No newline at end of file diff --git a/src/views/Wallet/components/LeftNavigation/components/Row/index.js b/src/views/Wallet/components/LeftNavigation/components/Row/index.js index c64fec1e..0540e720 100644 --- a/src/views/Wallet/components/LeftNavigation/components/Row/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/Row/index.js @@ -1,4 +1,4 @@ -import styled, { css } from 'styled-components'; +import styled from 'styled-components'; import React from 'react'; import PropTypes from 'prop-types'; diff --git a/src/views/Wallet/components/TopNavigationDeviceSettings/index.js b/src/views/Wallet/components/TopNavigationDeviceSettings/index.js index 3699023b..d721c6f3 100644 --- a/src/views/Wallet/components/TopNavigationDeviceSettings/index.js +++ b/src/views/Wallet/components/TopNavigationDeviceSettings/index.js @@ -1,30 +1,12 @@ -/* @flow */ - import styled from 'styled-components'; -import React, { Component } from 'react'; -import { NavLink } from 'react-router-dom'; - -type Props = { - pathname: string; -} -type State = { - style: { - width: number, - left: number - }; -} +import React from 'react'; const Wrapper = styled.div``; -const AccountTabs = (props: any): any => { - const urlParams = props.match.params; - const basePath = `/device/${urlParams.device}/network/${urlParams.network}/account/${urlParams.account}`; - - return ( - - Device settings - - ); -}; +const AccountTabs = () => ( + + Device settings + +); export default AccountTabs; \ No newline at end of file diff --git a/src/views/Wallet/index.js b/src/views/Wallet/index.js index 04b4c49b..b05906cc 100644 --- a/src/views/Wallet/index.js +++ b/src/views/Wallet/index.js @@ -6,8 +6,8 @@ import styled from 'styled-components'; import { connect } from 'react-redux'; import { Route, withRouter } from 'react-router-dom'; -import type { MapStateToProps, MapDispatchToProps } from 'react-redux'; -import type { State, Dispatch } from 'flowtype'; +import type { MapStateToProps } from 'react-redux'; +import type { State } from 'flowtype'; import Header from 'components/Header'; import Footer from 'components/Footer'; diff --git a/src/views/Wallet/views/AccountSend/components/PendingTransactions/index.js b/src/views/Wallet/views/AccountSend/components/PendingTransactions/index.js index 5399332e..7346824c 100644 --- a/src/views/Wallet/views/AccountSend/components/PendingTransactions/index.js +++ b/src/views/Wallet/views/AccountSend/components/PendingTransactions/index.js @@ -17,12 +17,6 @@ type Props = { network: Coin } -type Style = { - +color: string, - +background: string, - +borderColor: string -} - const Wrapper = styled.div` border-top: 1px solid ${colors.DIVIDER}; `; diff --git a/src/views/Wallet/views/AccountSummary/Container.js b/src/views/Wallet/views/AccountSummary/Container.js index 9f568e9f..e7239ebb 100644 --- a/src/views/Wallet/views/AccountSummary/Container.js +++ b/src/views/Wallet/views/AccountSummary/Container.js @@ -26,7 +26,7 @@ type DispatchProps = BaseDispatchProps & { export type Props = StateProps & BaseStateProps & DispatchProps & BaseDispatchProps; -const mapStateToProps: MapStateToProps = (state: State, own: OwnProps): StateProps => ({ +const mapStateToProps: MapStateToProps = (state: State): StateProps => ({ className: 'summary', selectedAccount: state.selectedAccount, wallet: state.wallet, diff --git a/src/views/Wallet/views/UnreadableDevice/index.js b/src/views/Wallet/views/UnreadableDevice/index.js index 54492de5..a9f0273b 100644 --- a/src/views/Wallet/views/UnreadableDevice/index.js +++ b/src/views/Wallet/views/UnreadableDevice/index.js @@ -12,12 +12,7 @@ import type { State, Dispatch } from 'flowtype'; const Wrapper = styled.div``; -type Props = { - acquiring: boolean; - acquireDevice: typeof TrezorConnectActions.acquire -} - -const UnreadableDevice = (props: Props) => ( +const UnreadableDevice = () => (