Unverified Commit 1af76439 authored by Thibaut Sardan's avatar Thibaut Sardan Committed by GitHub
Browse files

Merge pull request #211 from paritytech/optimize-imports

Imports optimization: sort and remove unused imports
parents a7c8ea8b 443a9dcd
......@@ -17,53 +17,35 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
'use strict';
import '../ReactotronConfig';
import React, { Component } from 'react';
import { Provider as UnstatedProvider, Subscribe, Container } from 'unstated';
import {
View,
Text,
Image,
StyleSheet,
AppState,
Alert,
StatusBar
} from 'react-native';
import {
createStackNavigator,
createBottomTabNavigator,
HeaderTitle,
Header,
HeaderBackButton,
withNavigation
} from 'react-navigation';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { default as HomeHeader } from './components/Header';
import { StatusBar } from 'react-native';
import { createBottomTabNavigator, createStackNavigator, HeaderBackButton, withNavigation } from 'react-navigation';
import { Provider as UnstatedProvider } from 'unstated';
import '../ReactotronConfig';
import colors from './colors';
import Background from './components/Background';
import HeaderLeftHome from './components/HeaderLeftHome';
import SecurityHeader from './components/SecurityHeader';
import Background from './components/Background';
import TabBarBottom from './components/TabBarBottom';
import TouchableItem from './components/TouchableItem';
import Loading from './screens/Loading';
import Security from './screens/Security';
import QrScanner from './screens/QrScanner';
import AccountList from './screens/AccountList';
import About from './screens/About';
import AccountAdd from './screens/AccountAdd';
import AccountNew from './screens/AccountNew';
import AccountNetworkChooser from './screens/AccountNetworkChooser';
import AccountRecover from './screens/AccountRecover';
import AccountBackup from './screens/AccountBackup';
import AccountPin from './screens/AccountPin';
import About from './screens/About';
import TermsAndConditions from './screens/TermsAndConditions';
import PrivacyPolicy from './screens/PrivacyPolicy';
import AccountDetails from './screens/AccountDetails';
import AccountEdit from './screens/AccountEdit';
import TxDetails from './screens/TxDetails';
import AccountList from './screens/AccountList';
import AccountNetworkChooser from './screens/AccountNetworkChooser';
import AccountNew from './screens/AccountNew';
import AccountPin from './screens/AccountPin';
import AccountRecover from './screens/AccountRecover';
import { AccountUnlock, AccountUnlockAndSign } from './screens/AccountUnlock';
import Loading from './screens/Loading';
import PrivacyPolicy from './screens/PrivacyPolicy';
import QrScanner from './screens/QrScanner';
import Security from './screens/Security';
import SignedTx from './screens/SignedTx';
import colors from './colors';
import TermsAndConditions from './screens/TermsAndConditions';
import TxDetails from './screens/TxDetails';
export default class App extends Component {
render() {
......
......@@ -16,27 +16,13 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Platform,
StyleSheet,
TouchableNativeFeedback,
TouchableOpacity,
ViewPropTypes
} from 'react-native';
import React from 'react';
import { StyleSheet, Text, View, ViewPropTypes } from 'react-native';
import colors from '../colors';
import { DEFAULT_NETWORK_COLOR, NETWORK_COLOR, NETWORK_TITLES } from '../constants';
import AccountIcon from './AccountIcon';
import Card from './Card';
import TouchableItem from './TouchableItem';
import {
NETWORK_LIST,
NETWORK_TITLES,
NETWORK_COLOR,
DEFAULT_NETWORK_COLOR
} from '../constants';
import colors from '../colors';
export default class AccountCard extends React.PureComponent<{
title: ?string,
......
......@@ -16,26 +16,13 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Platform,
StyleSheet,
TouchableNativeFeedback,
TouchableOpacity
} from 'react-native';
import Card from './Card';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import colors from '../colors';
import { DEFAULT_NETWORK_COLOR, NETWORK_COLOR, NETWORK_TITLES } from '../constants';
import AccountIcon from './AccountIcon';
import TouchableItem from './TouchableItem';
import {
NETWORK_LIST,
NETWORK_TITLES,
NETWORK_COLOR,
DEFAULT_NETWORK_COLOR
} from '../constants';
import colors from '../colors';
export default class AccountDetailsCard extends React.PureComponent<{
title: string,
......
......@@ -16,9 +16,9 @@
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import { Image, View, StyleSheet } from 'react-native';
import React from 'react';
import { Image, StyleSheet, View } from 'react-native';
import { blockiesIcon } from '../util/native';
export default class AccountIcon extends React.PureComponent {
......
......@@ -16,18 +16,11 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
StyleSheet,
ListView,
TouchableOpacity
} from 'react-native';
import { brainWalletAddress, words } from '../util/native';
import React from 'react';
import { ListView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import colors from '../colors';
import Card from './Card';
import { brainWalletAddress, words } from '../util/native';
import AccountIcon from './AccountIcon';
export default class AccountIconChooser extends React.PureComponent<{
......
......@@ -17,11 +17,11 @@
'use strict';
import React, { Component } from 'react';
import { Animated, Text, View, StyleSheet } from 'react-native';
import TouchableItem from './TouchableItem';
import TextInput from './TextInput';
import { WORDS, WORDS_INDEX } from '../util/account';
import { Animated, StyleSheet, Text, View } from 'react-native';
import colors from '../colors';
import { WORDS, WORDS_INDEX } from '../util/account';
import TextInput from './TextInput';
import TouchableItem from './TouchableItem';
export default class AccountSeed extends Component {
state = {
......
......@@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { StyleSheet, View } from 'react-native';
import colors from '../colors';
export default class Background extends React.PureComponent {
......
......@@ -16,17 +16,9 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Platform,
StyleSheet,
TouchableNativeFeedback,
TouchableOpacity,
ViewPropTypes
} from 'react-native';
import React from 'react';
import { Platform, StyleSheet, Text, TouchableNativeFeedback, TouchableOpacity, View, ViewPropTypes } from 'react-native';
import colors from '../colors';
export default class Button extends React.PureComponent<{
......
......@@ -16,17 +16,9 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Platform,
StyleSheet,
TouchableNativeFeedback,
TouchableOpacity,
ViewPropTypes
} from 'react-native';
import React from 'react';
import { Platform, StyleSheet, Text, TouchableNativeFeedback, TouchableOpacity, View, ViewPropTypes } from 'react-native';
import colors from '../colors';
export default class Card extends React.PureComponent<{
......
......@@ -16,9 +16,9 @@
'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Button, Text } from 'react-native';
import React, { Component } from 'react';
import { Button, Text, View } from 'react-native';
import AppStyles from '../styles';
function isAscii(data) {
......
......@@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React from 'react';
import { Text, View, StyleSheet, Image, SafeAreaView } from 'react-native';
import { Image, SafeAreaView, StyleSheet, Text, View } from 'react-native';
import colors from '../colors';
export default function() {
......
import React from 'react';
import { Text, View, StyleSheet, Image } from 'react-native';
import { Image, StyleSheet, Text, View } from 'react-native';
import colors from '../colors';
export default class HeaderLeftHome extends React.PureComponent {
......
......@@ -17,8 +17,7 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import { View, Text, Platform, StyleSheet } from 'react-native';
import { StyleSheet } from 'react-native';
import { default as MarkdownRender } from 'react-native-markdown-renderer';
import colors from '../colors';
......
......@@ -17,8 +17,7 @@
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet, Dimensions } from 'react-native';
import { Dimensions, StyleSheet, View } from 'react-native';
import QRCode from 'react-native-qrcode';
import colors from '../colors';
......
......@@ -15,13 +15,13 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { withNavigation } from 'react-navigation';
import { Subscribe } from 'unstated';
import Icon from 'react-native-vector-icons/MaterialIcons';
import TouchableItem from './TouchableItem';
import SecurityStore from '../stores/SecurityStore';
import colors from '../colors';
import SecurityStore from '../stores/SecurityStore';
import TouchableItem from './TouchableItem';
export default class SecurityHeader extends React.Component {
render() {
......
......@@ -17,15 +17,7 @@
/* @flow */
import React from 'react';
import {
Text,
Animated,
TouchableWithoutFeedback,
StyleSheet,
View,
Platform,
SafeAreaView
} from 'react-native';
import { Platform, SafeAreaView, StyleSheet, Text, TouchableWithoutFeedback, View } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import colors from '../colors';
import withDimensions from './utils/withDimensions';
......
......@@ -15,12 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React from 'react';
import PropTypes from 'prop-types';
import {
TextInput as TextInputOrigin,
Platform,
StyleSheet
} from 'react-native';
import { StyleSheet, TextInput as TextInputOrigin } from 'react-native';
import colors from '../colors';
export default class TextInput extends React.PureComponent {
......
......@@ -8,12 +8,7 @@
* of TouchableNativeFeedback.
*/
import React from 'react';
import {
Platform,
TouchableNativeFeedback,
TouchableOpacity,
View
} from 'react-native';
import { Platform, TouchableNativeFeedback, TouchableOpacity, View } from 'react-native';
const ANDROID_VERSION_LOLLIPOP = 21;
......
......@@ -16,20 +16,10 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
Platform,
StyleSheet,
TouchableNativeFeedback,
TouchableOpacity,
ViewPropTypes
} from 'react-native';
import React from 'react';
import { StyleSheet, Text, View, ViewPropTypes } from 'react-native';
import colors from '../colors';
import Card from './Card';
import AccountIcon from './AccountIcon';
const WEI_IN_ETH = 1000000000000000000;
......
......@@ -17,25 +17,7 @@
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import {
Alert,
ScrollView,
View,
Text,
TouchableOpacity,
Share,
StyleSheet,
Linking
} from 'react-native';
import { Subscribe } from 'unstated';
import Icon from 'react-native-vector-icons/MaterialIcons';
import AccountsStore from '../stores/AccountsStore';
import Background from '../components/Background';
import AccountSeed from '../components/AccountSeed';
import AccountIconChooser from '../components/AccountIconChooser';
import TextInput from '../components/TextInput';
import TouchableItem from '../components/TouchableItem';
import { Linking, ScrollView, StyleSheet, Text, View } from 'react-native';
import colors from '../colors';
export default class About extends React.PureComponent {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment