Fix import order issues

This commit is contained in:
Bill Thornton 2021-10-07 01:06:01 -04:00
parent bbb2b3fc1c
commit c49fd65125
20 changed files with 45 additions and 40 deletions

View File

@ -3,11 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import Constants from 'expo-constants';
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, View } from 'react-native';
import { Text, ThemeContext } from 'react-native-elements';
import Constants from 'expo-constants';
import { useTranslation } from 'react-i18next';
import { getAppName } from '../utils/Device';

View File

@ -3,9 +3,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { Icon, ListItem } from 'react-native-elements';
import PropTypes from 'prop-types';
import React from 'react';
import { Icon, ListItem } from 'react-native-elements';
import { openBrowser } from '../utils/WebBrowser';

View File

@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { Button, ListItem } from 'react-native-elements';
import PropTypes from 'prop-types';
import React from 'react';
import { StyleSheet } from 'react-native';
import { Button, ListItem } from 'react-native-elements';
const ButtonListItem = ({ item, index }) => (
<ListItem

View File

@ -3,11 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import PropTypes from 'prop-types';
import React, { useState } from 'react';
import { WebView } from 'react-native-webview';
import { Dimensions, RefreshControl, StyleSheet } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
import PropTypes from 'prop-types';
import { WebView } from 'react-native-webview';
const RefreshWebView = React.forwardRef(
function RefreshWebView({ isRefreshing, onRefresh, refreshControlProps, ...webViewProps }, ref) {

View File

@ -3,11 +3,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { Button, Icon, ListItem, ThemeContext } from 'react-native-elements';
import React, { useContext } from 'react';
import { StyleSheet, View } from 'react-native';
import PropTypes from 'prop-types';
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, View } from 'react-native';
import { Button, Icon, ListItem, ThemeContext } from 'react-native-elements';
import { getIconName } from '../utils/Icons';

View File

@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { ListItem } from 'react-native-elements';
import PropTypes from 'prop-types';
import React from 'react';
import { Switch } from 'react-native';
import { ListItem } from 'react-native-elements';
const SwitchListItem = ({ item, index }) => (
<ListItem

View File

@ -3,13 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import React, { useEffect, useRef, useState } from 'react';
import { Alert } from 'react-native';
import { Audio, Video } from 'expo-av';
import { observer } from 'mobx-react';
import React, { useEffect, useRef, useState } from 'react';
import { Alert } from 'react-native';
import { useStores } from '../hooks/useStores';
import MediaTypes from '../constants/MediaTypes';
import { useStores } from '../hooks/useStores';
import { msToTicks } from '../utils/Time';
const VideoPlayer = observer(() => {

View File

@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import * as Device from 'expo-device';
import Constants from 'expo-constants';
import React from 'react';
import { render } from '@testing-library/react-native';
import Constants from 'expo-constants';
import * as Device from 'expo-device';
import React from 'react';
import AppInfoFooter from '../AppInfoFooter';
import '../../i18n';

View File

@ -6,8 +6,8 @@
import { fireEvent, render } from '@testing-library/react-native';
import React from 'react';
import BrowserListItem from '../BrowserListItem';
import { openBrowser } from '../../utils/WebBrowser';
import BrowserListItem from '../BrowserListItem';
jest.mock('react-native-elements/src/icons/Icon', () => {
const mockComponent = require('react-native/jest/mockComponent');

View File

@ -5,6 +5,7 @@
*/
import { fireEvent, render } from '@testing-library/react-native';
import React from 'react';
import SwitchListItem from '../SwitchListItem';
describe('SwitchListItem', () => {

View File

@ -5,15 +5,15 @@
*/
import * as Localization from 'expo-localization';
import i18next from 'i18next';
import { I18nManager } from 'react-native';
import { initReactI18next } from 'react-i18next';
import { I18nManager } from 'react-native';
import en from './langs/en.json';
import ar from './langs/ar.json';
import bg from './langs/bg.json';
import cs from './langs/cs.json';
import da from './langs/da.json';
import de from './langs/de.json';
import en from './langs/en.json';
import es from './langs/es.json';
import es_419 from './langs/es_419.json';
import es_AR from './langs/es_AR.json';

View File

@ -3,8 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import AbortController from 'node-abort-controller';
global.AbortController = AbortController;
import { enableFetchMocks } from 'jest-fetch-mock';
import AbortController from 'node-abort-controller';
global.AbortController = AbortController;
enableFetchMocks();

View File

@ -3,15 +3,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import React, { useEffect } from 'react';
import { useNavigation } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { observer } from 'mobx-react';
import { useNavigation } from '@react-navigation/native';
import React, { useEffect } from 'react';
import ErrorScreen from '../screens/ErrorScreen';
import HomeScreen from '../screens/HomeScreen';
import Screens from '../constants/Screens';
import { useStores } from '../hooks/useStores';
import ErrorScreen from '../screens/ErrorScreen';
import HomeScreen from '../screens/HomeScreen';
const HomeStack = createStackNavigator();

View File

@ -3,19 +3,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import React, { useContext } from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Ionicons } from '@expo/vector-icons';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { observer } from 'mobx-react';
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { ThemeContext } from 'react-native-elements';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useTranslation } from 'react-i18next';
import { getIconName } from '../utils/Icons';
import HomeNavigator from './HomeNavigator';
import Screens from '../constants/Screens';
import SettingsScreen from '../screens/SettingsScreen';
import { useStores } from '../hooks/useStores';
import SettingsScreen from '../screens/SettingsScreen';
import { getIconName } from '../utils/Icons';
import HomeNavigator from './HomeNavigator';
function TabIcon(routeName, color, size) {
let iconName = null;

View File

@ -3,12 +3,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { useNavigation, useRoute } from '@react-navigation/native';
import React, { useContext, useState } from 'react';
import { Platform, RefreshControl, StyleSheet, View } from 'react-native';
import { ThemeContext } from 'react-native-elements';
import { ScrollView } from 'react-native-gesture-handler';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
import { useNavigation, useRoute } from '@react-navigation/native';
import ErrorView from '../components/ErrorView';
import Screens from '../constants/Screens';

View File

@ -3,21 +3,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { useFocusEffect, useNavigation } from '@react-navigation/native';
import { observer } from 'mobx-react';
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { BackHandler, Platform, StyleSheet, View } from 'react-native';
import { ThemeContext } from 'react-native-elements';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
import { useFocusEffect, useNavigation } from '@react-navigation/native';
import { observer } from 'mobx-react';
import { useStores } from '../hooks/useStores';
import NativeShellWebView from '../components/NativeShellWebView';
import ErrorView from '../components/ErrorView';
import NativeShellWebView from '../components/NativeShellWebView';
import VideoPlayer from '../components/VideoPlayer';
import Colors from '../constants/Colors';
import Screens from '../constants/Screens';
import { useStores } from '../hooks/useStores';
import { getIconName } from '../utils/Icons';
import VideoPlayer from '../components/VideoPlayer';
const HomeScreen = observer(() => {
const { rootStore } = useStores();

View File

@ -3,9 +3,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import * as SplashScreen from 'expo-splash-screen';
import * as React from 'react';
import { ActivityIndicator, Image, StyleSheet, View } from 'react-native';
import * as SplashScreen from 'expo-splash-screen';
import Colors from '../constants/Colors';

View File

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import BaseTheme from '../base/elements';
import Colors from '../../constants/Colors';
import BaseTheme from '../base/elements';
export default {
...BaseTheme,

View File

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import BaseTheme from '../base/elements';
import Colors from '../../constants/Colors';
import BaseTheme from '../base/elements';
export default {
...BaseTheme,

View File

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import { DefaultTheme } from '@react-navigation/native';
import Colors from '../../constants/Colors';
export default {