mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
Common components refactored
This commit is contained in:
parent
f9a6bed330
commit
bf452ae054
@ -4,7 +4,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
|
|
||||||
import * as LogActions from 'actions/LogActions';
|
import * as LogActions from 'actions/LogActions';
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import * as NOTIFICATION from 'actions/constants/notification';
|
import * as NOTIFICATION from 'actions/constants/notification';
|
||||||
import * as NotificationActions from 'actions/NotificationActions';
|
import * as NotificationActions from 'actions/NotificationActions';
|
||||||
import type { Action, State, Dispatch } from 'flowtype';
|
import type { Action, State, Dispatch } from 'flowtype';
|
||||||
import Loader from './LoaderCircle';
|
import Loader from 'components/LoaderCircle';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
notifications: $ElementType<State, 'notifications'>,
|
notifications: $ElementType<State, 'notifications'>,
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import Loader from '../common/LoaderCircle';
|
import Loader from 'components/LoaderCircle';
|
||||||
|
|
||||||
import type { Props } from './index';
|
import type { Props } from './index';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Notification } from 'components/common/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
||||||
|
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import DashboardImg from 'images/dashboard.png';
|
import DashboardImg from 'images/dashboard.png';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import Icon from 'components/common/Icon';
|
import Icon from 'components/Icon';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import Button from 'components/common/Button';
|
import Button from 'components/Button';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Notification } from 'components/common/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
import * as TrezorConnectActions from 'actions/TrezorConnectActions';
|
||||||
|
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import TrezorConnect from 'trezor-connect';
|
import TrezorConnect from 'trezor-connect';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
|
|
||||||
import type { State, TrezorDevice } from 'flowtype';
|
import type { State, TrezorDevice } from 'flowtype';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Loader from 'components/common/LoaderCircle';
|
import Loader from 'components/LoaderCircle';
|
||||||
|
|
||||||
export default (props: {}): React$Element<string> => (
|
export default (props: {}): React$Element<string> => (
|
||||||
<section className="landing">
|
<section className="landing">
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import Header from 'components/common/Header';
|
import Header from 'components/Header';
|
||||||
import Footer from 'components/common/Footer';
|
import Footer from 'components/Footer';
|
||||||
import Log from 'components/common/Log';
|
import Log from 'components/Log';
|
||||||
import Notifications, { Notification } from 'components/common/Notification';
|
import Notifications, { Notification } from 'components/Notification';
|
||||||
|
|
||||||
import Preloader from './components/Preloader';
|
import Preloader from './components/Preloader';
|
||||||
import ConnectDevice from './components/ConnectDevice';
|
import ConnectDevice from './components/ConnectDevice';
|
||||||
|
@ -7,7 +7,7 @@ import BigNumber from 'bignumber.js';
|
|||||||
|
|
||||||
import { findDeviceAccounts } from 'reducers/AccountsReducer';
|
import { findDeviceAccounts } from 'reducers/AccountsReducer';
|
||||||
import * as stateUtils from 'reducers/utils';
|
import * as stateUtils from 'reducers/utils';
|
||||||
import Loader from 'components/common/LoaderCircle';
|
import Loader from 'components/LoaderCircle';
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'rc-tooltip';
|
||||||
|
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import coins from 'constants/coins';
|
import coins from 'constants/coins';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import { FONT_SIZE } from 'config/variables';
|
import { FONT_SIZE, ICON_SIZE } from 'config/variables';
|
||||||
import Icon from 'components/common/Icon';
|
import Icon from 'components/Icon';
|
||||||
import ICONS from 'config/icons';
|
import ICONS from 'config/icons';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { ICON_SIZE } from 'config/variables';
|
|
||||||
import { coinProp } from '../common';
|
import { coinProp } from '../common';
|
||||||
import Divider from '../Divider';
|
import Divider from '../Divider';
|
||||||
import Row from '../Row';
|
import Row from '../Row';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
|
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'rc-tooltip';
|
||||||
import { QRCode } from 'react-qr-svg';
|
import { QRCode } from 'react-qr-svg';
|
||||||
|
|
||||||
import { Notification } from 'components/common/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
import SelectedAccount from '../SelectedAccount';
|
import SelectedAccount from '../SelectedAccount';
|
||||||
|
|
||||||
import type { Props } from './index';
|
import type { Props } from './index';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Notification } from 'components/common/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
State, TrezorDevice, Action, ThunkAction,
|
State, TrezorDevice, Action, ThunkAction,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ColorHash from 'color-hash';
|
import ColorHash from 'color-hash';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import ScaleText from 'react-scale-text';
|
import ScaleText from 'react-scale-text';
|
||||||
|
|
||||||
import { findAccountTokens } from 'reducers/TokensReducer';
|
import { findAccountTokens } from 'reducers/TokensReducer';
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import Select from 'react-select';
|
import Select from 'react-select';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import { calculate, validation } from 'actions/SendFormActions';
|
import { calculate, validation } from 'actions/SendFormActions';
|
||||||
import type { Token } from 'flowtype';
|
import type { Token } from 'flowtype';
|
||||||
import AdvancedForm from './components/AdvancedForm';
|
import AdvancedForm from './components/AdvancedForm';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { H2 } from 'components/common/Heading';
|
import { H2 } from 'components/Heading';
|
||||||
import BigNumber from 'bignumber.js';
|
import BigNumber from 'bignumber.js';
|
||||||
import { Async as AsyncSelect } from 'react-select';
|
import { Async as AsyncSelect } from 'react-select';
|
||||||
import Tooltip from 'rc-tooltip';
|
import Tooltip from 'rc-tooltip';
|
||||||
|
|
||||||
import { resolveAfter } from 'utils/promiseUtils';
|
import { resolveAfter } from 'utils/promiseUtils';
|
||||||
import { Notification } from 'components/common/Notification';
|
import { Notification } from 'components/Notification';
|
||||||
import * as stateUtils from 'reducers/utils';
|
import * as stateUtils from 'reducers/utils';
|
||||||
import type { NetworkToken } from 'reducers/LocalStorageReducer';
|
import type { NetworkToken } from 'reducers/LocalStorageReducer';
|
||||||
import SelectedAccount from '../SelectedAccount';
|
import SelectedAccount from '../SelectedAccount';
|
||||||
|
@ -7,12 +7,12 @@ import { Route, withRouter } from 'react-router-dom';
|
|||||||
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||||||
import type { State, Dispatch } from 'flowtype';
|
import type { State, Dispatch } from 'flowtype';
|
||||||
|
|
||||||
import Header from 'components/common/Header';
|
import Header from 'components/Header';
|
||||||
import Footer from 'components/common/Footer';
|
import Footer from 'components/Footer';
|
||||||
import DeviceSettingsTabs from 'components/wallet/pages/DeviceSettingsTabs';
|
import DeviceSettingsTabs from 'components/wallet/pages/DeviceSettingsTabs';
|
||||||
import ModalContainer from 'components/modal';
|
import ModalContainer from 'components/modal';
|
||||||
import Notifications from 'components/common/Notification';
|
import Notifications from 'components/Notification';
|
||||||
import Log from 'components/common/Log';
|
import Log from 'components/Log';
|
||||||
|
|
||||||
import LeftNavigation from './components/LeftNavigation/Container';
|
import LeftNavigation from './components/LeftNavigation/Container';
|
||||||
import AccountTabs from './components/Tabs';
|
import AccountTabs from './components/Tabs';
|
||||||
|
Loading…
Reference in New Issue
Block a user