diff --git a/biome.json b/biome.json index e46661481..977c5283c 100644 --- a/biome.json +++ b/biome.json @@ -28,8 +28,5 @@ "bracketSameLine": true, "quoteStyle": "single" } - }, - "organizeImports": { - "enabled": false } } diff --git a/package.json b/package.json index 2090d38cc..987babeb4 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,8 @@ "e2e:test:ios-release": "detox test --configuration ios.release", "e2e:test:android-debug": "DEV=true detox test --configuration android.debug", "e2e:test:android-release": "detox test --configuration android.release", - "format:check": "biome format ./src/**/*.{js,jsx,ts,tsx}", - "format:fix": "biome format --write ./src/**/*.{js,jsx,ts,tsx}", - "lint:check": "biome lint ./src/**/*.{js,jsx,ts,tsx}", - "lint:fix": "biome lint --write ./src/**/*.{js,jsx,ts,tsx}", + "lint:check": "biome check ./src/**/*.{js,jsx,ts,tsx}", + "lint:fix": "biome check --write ./src/**/*.{js,jsx,ts,tsx}", "tsc:check": "tsc -p tsconfig.json --noEmit", "clean": "yarn clean:rn && yarn clean:ios && yarn clean:android && yarn start --reset-cache", "clean:rn": "watchman watch-del-all && npx del-cli node_modules && yarn && npx del-cli /tmp/metro-*", diff --git a/src/AppOnboarded.tsx b/src/AppOnboarded.tsx index 9effebc50..ecda94f2f 100644 --- a/src/AppOnboarded.tsx +++ b/src/AppOnboarded.tsx @@ -1,28 +1,28 @@ -import React, { memo, ReactElement, useEffect, useRef } from 'react'; -import { AppState } from 'react-native'; import NetInfo from '@react-native-community/netinfo'; +import React, { memo, ReactElement, useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { AppState } from 'react-native'; -import RootNavigator from './navigation/root/RootNavigator'; import InactivityTracker from './components/InactivityTracker'; -import { showToast } from './utils/notifications'; -import { startWalletServices } from './utils/startup'; -import { getOnChainWalletElectrumAsync } from './utils/wallet'; -import { unsubscribeFromLightningSubscriptions } from './utils/lightning'; import { useAppSelector } from './hooks/redux'; +import RootNavigator from './navigation/root/RootNavigator'; import { dispatch } from './store/helpers'; -import { updateUi } from './store/slices/ui'; -import { isOnlineSelector } from './store/reselect/ui'; import { hideBalanceOnOpenSelector, pinOnLaunchSelector, pinSelector, } from './store/reselect/settings'; +import { isOnlineSelector } from './store/reselect/ui'; import { selectedNetworkSelector, selectedWalletSelector, } from './store/reselect/wallet'; import { updateSettings } from './store/slices/settings'; +import { updateUi } from './store/slices/ui'; +import { unsubscribeFromLightningSubscriptions } from './utils/lightning'; +import { showToast } from './utils/notifications'; +import { startWalletServices } from './utils/startup'; +import { getOnChainWalletElectrumAsync } from './utils/wallet'; // import { updateExchangeRates } from './store/actions/wallet'; const AppOnboarded = (): ReactElement => { diff --git a/src/Root.tsx b/src/Root.tsx index 622536d7c..8d0cb70fb 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -1,9 +1,9 @@ +import { EventEmitter } from 'events'; import React, { ReactElement } from 'react'; -import { View, StyleSheet } from 'react-native'; -import { PersistGate } from 'redux-persist/integration/react'; -import { enableScreens, enableFreeze } from 'react-native-screens'; +import { StyleSheet, View } from 'react-native'; +import { enableFreeze, enableScreens } from 'react-native-screens'; import { Provider } from 'react-redux'; -import { EventEmitter } from 'events'; +import { PersistGate } from 'redux-persist/integration/react'; import App from './App'; import ErrorBoundary from './ErrorBoundary'; diff --git a/src/components/ActivityHeader.tsx b/src/components/ActivityHeader.tsx index 8af58efc2..94123fbe0 100644 --- a/src/components/ActivityHeader.tsx +++ b/src/components/ActivityHeader.tsx @@ -7,16 +7,16 @@ import { ViewStyle, } from 'react-native'; -import { EyeIcon } from '../styles/icons'; -import Money from './Money'; -import DetectSwipe from './DetectSwipe'; -import { useSwitchUnitAnnounced } from '../hooks/wallet'; import { useAppDispatch, useAppSelector } from '../hooks/redux'; -import { updateSettings } from '../store/slices/settings'; +import { useSwitchUnitAnnounced } from '../hooks/wallet'; import { enableSwipeToHideBalanceSelector, hideBalanceSelector, } from '../store/reselect/settings'; +import { updateSettings } from '../store/slices/settings'; +import { EyeIcon } from '../styles/icons'; +import DetectSwipe from './DetectSwipe'; +import Money from './Money'; const ActivityHeader = ({ balance, diff --git a/src/components/ActivityIndicator.tsx b/src/components/ActivityIndicator.tsx index d067b504b..e015901a4 100644 --- a/src/components/ActivityIndicator.tsx +++ b/src/components/ActivityIndicator.tsx @@ -1,4 +1,3 @@ -import React, { ReactElement, useEffect, useMemo } from 'react'; import { Canvas, Path, @@ -6,6 +5,7 @@ import { SweepGradient, vec, } from '@shopify/react-native-skia'; +import React, { ReactElement, useEffect, useMemo } from 'react'; import Animated, { Easing, FadeIn, diff --git a/src/components/AdjustValue.tsx b/src/components/AdjustValue.tsx index 877708f01..bd9055f4b 100644 --- a/src/components/AdjustValue.tsx +++ b/src/components/AdjustValue.tsx @@ -1,13 +1,13 @@ import React, { ReactElement, ReactNode } from 'react'; import { - View, - TouchableOpacity, - StyleSheet, StyleProp, + StyleSheet, + TouchableOpacity, + View, ViewStyle, } from 'react-native'; -import { BodyMSB, BodySSB } from '../styles/text'; import { MinusCircledIcon, PlusCircledIcon } from '../styles/icons'; +import { BodyMSB, BodySSB } from '../styles/text'; type AdjustValueProps = { value: ReactNode; diff --git a/src/components/Amount.tsx b/src/components/Amount.tsx index afd1588c8..00189d105 100644 --- a/src/components/Amount.tsx +++ b/src/components/Amount.tsx @@ -1,9 +1,9 @@ import React, { ReactElement } from 'react'; -import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { Display } from '../styles/text'; import { useCurrency } from '../hooks/displayValues'; import { EUnit } from '../store/types/wallet'; +import { Display } from '../styles/text'; const Amount = ({ value, diff --git a/src/components/AmountToggle.tsx b/src/components/AmountToggle.tsx index 5a2a32978..38a211c5e 100644 --- a/src/components/AmountToggle.tsx +++ b/src/components/AmountToggle.tsx @@ -1,8 +1,8 @@ import React, { memo, ReactElement } from 'react'; import { StyleProp, StyleSheet, ViewStyle } from 'react-native'; -import { Pressable } from '../styles/components'; import Money from '../components/Money'; +import { Pressable } from '../styles/components'; /** * Displays the total amount of sats specified and it's corresponding fiat value. diff --git a/src/components/AuthCheck.tsx b/src/components/AuthCheck.tsx index e835ccf93..29426628a 100644 --- a/src/components/AuthCheck.tsx +++ b/src/components/AuthCheck.tsx @@ -1,13 +1,13 @@ +import { RouteProp } from '@react-navigation/native'; import React, { memo, ReactElement, useState } from 'react'; import { StyleSheet } from 'react-native'; -import { useAppSelector } from '../hooks/redux'; -import { RouteProp } from '@react-navigation/native'; import Animated, { FadeOut } from 'react-native-reanimated'; +import { useAppSelector } from '../hooks/redux'; +import { biometricsSelector } from '../store/reselect/settings'; import { View as ThemedView } from '../styles/components'; import Biometrics from './Biometrics'; import PinPad from './PinPad'; -import { biometricsSelector } from '../store/reselect/settings'; type AuthCheckProps = { showBackNavigation?: boolean; diff --git a/src/components/BalanceHeader.tsx b/src/components/BalanceHeader.tsx index f064615c9..4524691bf 100644 --- a/src/components/BalanceHeader.tsx +++ b/src/components/BalanceHeader.tsx @@ -1,14 +1,14 @@ import React, { memo, ReactElement } from 'react'; +import { Trans, useTranslation } from 'react-i18next'; import { StyleSheet, TouchableOpacity, View } from 'react-native'; import { useAppDispatch, useAppSelector } from '../hooks/redux'; -import { Trans, useTranslation } from 'react-i18next'; -import { Caption13Up } from '../styles/text'; -import { EyeIcon } from '../styles/icons'; -import Money from './Money'; import { useBalance, useSwitchUnitAnnounced } from '../hooks/wallet'; -import { updateSettings } from '../store/slices/settings'; import { hideBalanceSelector } from '../store/reselect/settings'; +import { updateSettings } from '../store/slices/settings'; +import { EyeIcon } from '../styles/icons'; +import { Caption13Up } from '../styles/text'; +import Money from './Money'; /** * Displays the total available balance for the current wallet & network. diff --git a/src/components/Balances.tsx b/src/components/Balances.tsx index d3947b785..2b0886a7d 100644 --- a/src/components/Balances.tsx +++ b/src/components/Balances.tsx @@ -1,18 +1,18 @@ -import React, { memo, ReactElement } from 'react'; -import { View, StyleSheet, TouchableOpacity } from 'react-native'; import { useNavigation } from '@react-navigation/native'; +import React, { memo, ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; +import { StyleSheet, TouchableOpacity, View } from 'react-native'; +import { useBalance } from '../hooks/wallet'; +import { RootNavigationProp } from '../navigation/types'; +import { View as ThemedView } from '../styles/components'; import { BitcoinCircleIcon, LightningCircleIcon, TransferIcon, } from '../styles/icons'; import { Caption13Up } from '../styles/text'; -import { View as ThemedView } from '../styles/components'; import Money from './Money'; -import { useBalance } from '../hooks/wallet'; -import { RootNavigationProp } from '../navigation/types'; const Balance = ({ label, diff --git a/src/components/BaseFeedWidget.tsx b/src/components/BaseFeedWidget.tsx index 6f23c134b..4507d310e 100644 --- a/src/components/BaseFeedWidget.tsx +++ b/src/components/BaseFeedWidget.tsx @@ -1,24 +1,24 @@ import React, { memo, ReactElement, useState } from 'react'; -import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; +import { useAppDispatch, useAppSelector } from '../hooks/redux'; +import { useSlashfeed } from '../hooks/widgets'; import { rootNavigation } from '../navigation/root/RootNavigator'; +import { showWidgetTitlesSelector } from '../store/reselect/settings'; +import { deleteWidget } from '../store/slices/widgets'; import { TouchableOpacity } from '../styles/components'; -import { BodyMSB } from '../styles/text'; import { - SettingsIcon, ListIcon, - TrashIcon, QuestionMarkIcon, + SettingsIcon, + TrashIcon, } from '../styles/icons'; -import { useAppDispatch, useAppSelector } from '../hooks/redux'; -import { useSlashfeed } from '../hooks/widgets'; +import { BodyMSB } from '../styles/text'; import { truncate } from '../utils/helpers'; -import { deleteWidget } from '../store/slices/widgets'; -import { showWidgetTitlesSelector } from '../store/reselect/settings'; import Dialog from './Dialog'; -import SvgImage from './SvgImage'; import LoadingView from './LoadingView'; +import SvgImage from './SvgImage'; const BaseFeedWidget = ({ url, diff --git a/src/components/Biometrics.tsx b/src/components/Biometrics.tsx index 8ad7a50fa..a45bb64b6 100644 --- a/src/components/Biometrics.tsx +++ b/src/components/Biometrics.tsx @@ -5,18 +5,18 @@ import React, { useEffect, useState, } from 'react'; +import { useTranslation } from 'react-i18next'; import { StyleProp, StyleSheet, ViewStyle } from 'react-native'; -import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { BiometryType } from 'react-native-biometrics'; -import { useTranslation } from 'react-i18next'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { View, TouchableOpacity } from '../styles/components'; -import { Subtitle } from '../styles/text'; -import { FingerPrintIcon } from '../styles/icons'; import { useAppDispatch } from '../hooks/redux'; import { updateSettings } from '../store/slices/settings'; -import { vibrate } from '../utils/helpers'; +import { TouchableOpacity, View } from '../styles/components'; +import { FingerPrintIcon } from '../styles/icons'; +import { Subtitle } from '../styles/text'; import rnBiometrics from '../utils/biometrics'; +import { vibrate } from '../utils/helpers'; export interface IsSensorAvailableResult { available: boolean; diff --git a/src/components/BlocksWidget.tsx b/src/components/BlocksWidget.tsx index 9785504e4..566e3d43c 100644 --- a/src/components/BlocksWidget.tsx +++ b/src/components/BlocksWidget.tsx @@ -1,15 +1,15 @@ +import { Reader } from '@synonymdev/slashtags-widget-bitcoin-feed'; import React, { memo, ReactElement, useEffect, useState } from 'react'; -import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { Reader } from '@synonymdev/slashtags-widget-bitcoin-feed'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { CaptionB, BodyMSB, BodySSB } from '../styles/text'; -import BaseFeedWidget from './BaseFeedWidget'; -import { TFeedWidget } from '../store/types/widgets'; -import { useSlashfeed } from '../hooks/widgets'; -import { decodeWidgetFieldValue, SUPPORTED_FEED_TYPES } from '../utils/widgets'; -import { useSlashtags } from '../hooks/slashtags'; import { __E2E__ } from '../constants/env'; +import { useSlashtags } from '../hooks/slashtags'; +import { useSlashfeed } from '../hooks/widgets'; +import { TFeedWidget } from '../store/types/widgets'; +import { BodyMSB, BodySSB, CaptionB } from '../styles/text'; +import { SUPPORTED_FEED_TYPES, decodeWidgetFieldValue } from '../utils/widgets'; +import BaseFeedWidget from './BaseFeedWidget'; const mapping = { Block: 'height', diff --git a/src/components/BlurView.tsx b/src/components/BlurView.tsx index 0ec0e3acd..a934145a1 100644 --- a/src/components/BlurView.tsx +++ b/src/components/BlurView.tsx @@ -1,6 +1,6 @@ -import React, { ReactElement, ReactNode } from 'react'; -import { StyleSheet, Platform, StyleProp, ViewStyle } from 'react-native'; import { BlurView as Blur } from '@react-native-community/blur'; +import React, { ReactElement, ReactNode } from 'react'; +import { Platform, StyleProp, StyleSheet, ViewStyle } from 'react-native'; import { View } from '../styles/components'; type BlurViewProps = { diff --git a/src/components/BottomSheetScreen.tsx b/src/components/BottomSheetScreen.tsx index eb7bb472e..7d33dbbe5 100644 --- a/src/components/BottomSheetScreen.tsx +++ b/src/components/BottomSheetScreen.tsx @@ -7,9 +7,9 @@ import { View, } from 'react-native'; -import { BodyM, Display } from '../styles/text'; import BottomSheetNavigationHeader from '../components/BottomSheetNavigationHeader'; import SafeAreaInset from '../components/SafeAreaInset'; +import { BodyM, Display } from '../styles/text'; import Button from './buttons/Button'; const BottomSheetScreen = ({ diff --git a/src/components/BottomSheetWrapper.tsx b/src/components/BottomSheetWrapper.tsx index 68df764b8..755c1efaa 100644 --- a/src/components/BottomSheetWrapper.tsx +++ b/src/components/BottomSheetWrapper.tsx @@ -18,6 +18,12 @@ * getStore().user.viewController['viewName'].isOpen; ***********************************************************************************/ +import BottomSheet, { + BottomSheetView, + BottomSheetBackdrop, + BottomSheetBackgroundProps, + BottomSheetBackdropProps, +} from '@gorhom/bottom-sheet'; import React, { memo, ReactElement, @@ -31,20 +37,14 @@ import React, { } from 'react'; import { StyleSheet } from 'react-native'; import { useReducedMotion } from 'react-native-reanimated'; -import BottomSheet, { - BottomSheetView, - BottomSheetBackdrop, - BottomSheetBackgroundProps, - BottomSheetBackdropProps, -} from '@gorhom/bottom-sheet'; import { useTheme } from 'styled-components/native'; +import { __E2E__ } from '../constants/env'; +import { useAppDispatch, useAppSelector } from '../hooks/redux'; +import { viewControllerSelector } from '../store/reselect/ui'; import { closeSheet } from '../store/slices/ui'; import { TViewController } from '../store/types/ui'; -import { viewControllerSelector } from '../store/reselect/ui'; -import { useAppDispatch, useAppSelector } from '../hooks/redux'; import BottomSheetBackground from './BottomSheetBackground'; -import { __E2E__ } from '../constants/env'; export interface BottomSheetWrapperProps { children: ReactElement; diff --git a/src/components/Camera.tsx b/src/components/Camera.tsx index 573b153f4..0951c7877 100644 --- a/src/components/Camera.tsx +++ b/src/components/Camera.tsx @@ -1,9 +1,9 @@ -import React, { ReactElement, useState, useEffect } from 'react'; -import { StyleSheet, Platform, View } from 'react-native'; import { useIsFocused } from '@react-navigation/native'; -import { check, request, PERMISSIONS, RESULTS } from 'react-native-permissions'; -import { Camera as CameraKit, CameraType } from 'react-native-camera-kit'; +import React, { ReactElement, useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { Platform, StyleSheet, View } from 'react-native'; +import { Camera as CameraKit, CameraType } from 'react-native-camera-kit'; +import { PERMISSIONS, RESULTS, check, request } from 'react-native-permissions'; import CameraNoAuth from './CameraNoAuth'; import GradientView from './GradientView'; diff --git a/src/components/CameraNoAuth.tsx b/src/components/CameraNoAuth.tsx index 1dcf0d4aa..2926cba50 100644 --- a/src/components/CameraNoAuth.tsx +++ b/src/components/CameraNoAuth.tsx @@ -1,13 +1,13 @@ import React, { ReactElement } from 'react'; -import { View, Linking, Platform, StyleSheet } from 'react-native'; import { Trans, useTranslation } from 'react-i18next'; +import { Linking, Platform, StyleSheet, View } from 'react-native'; -import { BodyM, BodyMB } from '../styles/text'; import { ExclamationIcon } from '../styles/icons'; -import SafeAreaView from './SafeAreaView'; -import NavigationHeader from './NavigationHeader'; +import { BodyM, BodyMB } from '../styles/text'; import BottomSheetNavigationHeader from './BottomSheetNavigationHeader'; +import NavigationHeader from './NavigationHeader'; import SafeAreaInset from './SafeAreaInset'; +import SafeAreaView from './SafeAreaView'; import Button from './buttons/Button'; const CameraNoAuth = ({ diff --git a/src/components/ContactSmall.tsx b/src/components/ContactSmall.tsx index 235cd93be..1c68cb59b 100644 --- a/src/components/ContactSmall.tsx +++ b/src/components/ContactSmall.tsx @@ -1,11 +1,11 @@ import React, { ReactElement, memo } from 'react'; import { StyleProp, StyleSheet, ViewStyle } from 'react-native'; +import { useProfile } from '../hooks/slashtags'; import { TouchableHighlight, TouchableOpacity } from '../styles/components'; +import { XIcon } from '../styles/icons'; import { BodySSB } from '../styles/text'; -import { useProfile } from '../hooks/slashtags'; import ProfileImage from './ProfileImage'; -import { XIcon } from '../styles/icons'; const ContactSmall = ({ url, diff --git a/src/components/ContactsList.tsx b/src/components/ContactsList.tsx index b9dceb864..1ba4ea4b4 100644 --- a/src/components/ContactsList.tsx +++ b/src/components/ContactsList.tsx @@ -1,19 +1,19 @@ +import { BottomSheetSectionList } from '@gorhom/bottom-sheet'; import React, { ReactElement, useCallback, useMemo } from 'react'; -import { View, SectionList, StyleSheet, TouchableOpacity } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { SectionList, StyleSheet, TouchableOpacity, View } from 'react-native'; import { useAppSelector } from '../hooks/redux'; -import { BottomSheetSectionList } from '@gorhom/bottom-sheet'; -import ProfileImage from './ProfileImage'; -import SlashtagURL from './SlashtagURL'; -import Divider from './Divider'; -import { View as ThemedView } from '../styles/components'; -import { Caption13Up, BodyMSB } from '../styles/text'; import { useProfile, useSlashtags } from '../hooks/slashtags'; +import { contactsSelector } from '../store/reselect/slashtags'; import { IContactRecord } from '../store/types/slashtags'; -import { truncate } from '../utils/helpers'; +import { View as ThemedView } from '../styles/components'; +import { BodyMSB, Caption13Up } from '../styles/text'; import { IThemeColors } from '../styles/themes'; -import { contactsSelector } from '../store/reselect/slashtags'; +import { truncate } from '../utils/helpers'; +import Divider from './Divider'; +import ProfileImage from './ProfileImage'; +import SlashtagURL from './SlashtagURL'; export const ContactItem = ({ contact, diff --git a/src/components/DetectSwipe.tsx b/src/components/DetectSwipe.tsx index a21b963e4..d65fdadb3 100644 --- a/src/components/DetectSwipe.tsx +++ b/src/components/DetectSwipe.tsx @@ -1,7 +1,7 @@ import React, { memo, MutableRefObject, ReactElement, useRef } from 'react'; import { - GestureDetector, Gesture, + GestureDetector, GestureType, } from 'react-native-gesture-handler'; diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx index dfc327200..aca3ce4d3 100644 --- a/src/components/Dialog.tsx +++ b/src/components/Dialog.tsx @@ -1,13 +1,13 @@ import React, { memo, ReactElement, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { + Platform, StyleSheet, Text, - View, - Platform, TouchableOpacity, + View, } from 'react-native'; import Modal from 'react-native-modal'; -import { useTranslation } from 'react-i18next'; import colors from '../styles/colors'; import { IThemeColors } from '../styles/themes'; diff --git a/src/components/FactsWidget.tsx b/src/components/FactsWidget.tsx index 6d03e7539..a4cc6dfe0 100644 --- a/src/components/FactsWidget.tsx +++ b/src/components/FactsWidget.tsx @@ -1,11 +1,11 @@ +import { Reader } from '@synonymdev/slashtags-widget-facts-feed'; import React, { memo, ReactElement, useEffect, useState } from 'react'; -import { StyleProp, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; -import { Reader } from '@synonymdev/slashtags-widget-facts-feed'; +import { StyleProp, ViewStyle } from 'react-native'; +import { useSlashtags } from '../hooks/slashtags'; import { Title } from '../styles/text'; import { showToast } from '../utils/notifications'; -import { useSlashtags } from '../hooks/slashtags'; import BaseFeedWidget from './BaseFeedWidget'; const FactsWidget = ({ diff --git a/src/components/FeedWidget.tsx b/src/components/FeedWidget.tsx index 36740141a..e6a10189f 100644 --- a/src/components/FeedWidget.tsx +++ b/src/components/FeedWidget.tsx @@ -1,10 +1,10 @@ import React, { memo, ReactElement } from 'react'; -import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { CaptionB, BodyMSB, BodySSB } from '../styles/text'; -import { TFeedWidget } from '../store/types/widgets'; import { useSlashfeed } from '../hooks/widgets'; +import { TFeedWidget } from '../store/types/widgets'; +import { BodyMSB, BodySSB, CaptionB } from '../styles/text'; import BaseFeedWidget from './BaseFeedWidget'; const FeedWidget = ({ diff --git a/src/components/Glow.tsx b/src/components/Glow.tsx index 411ce2804..ca5b4db6f 100644 --- a/src/components/Glow.tsx +++ b/src/components/Glow.tsx @@ -1,6 +1,6 @@ +import { Canvas, RadialGradient, Rect, vec } from '@shopify/react-native-skia'; import React, { memo, ReactElement, useMemo, useEffect } from 'react'; import { useSharedValue, withTiming } from 'react-native-reanimated'; -import { Canvas, RadialGradient, Rect, vec } from '@shopify/react-native-skia'; import useColors from '../hooks/colors'; import { IThemeColors } from '../styles/themes'; diff --git a/src/components/GradientBackground.tsx b/src/components/GradientBackground.tsx index d24fd1bdc..18afb9b70 100644 --- a/src/components/GradientBackground.tsx +++ b/src/components/GradientBackground.tsx @@ -1,3 +1,4 @@ +import { Canvas, LinearGradient, Rect, vec } from '@shopify/react-native-skia'; import React, { ReactElement, ReactNode, useState } from 'react'; import { LayoutChangeEvent, @@ -5,7 +6,6 @@ import { StyleSheet, ViewStyle, } from 'react-native'; -import { Canvas, LinearGradient, Rect, vec } from '@shopify/react-native-skia'; import { View as ThemedView } from '../styles/components'; const GradientBackground = ({ diff --git a/src/components/GradientView.tsx b/src/components/GradientView.tsx index 5b81cfa61..b29bfd39b 100644 --- a/src/components/GradientView.tsx +++ b/src/components/GradientView.tsx @@ -1,10 +1,10 @@ import React, { memo, ReactElement, ReactNode } from 'react'; import { - View, Image, ImageSourcePropType, StyleProp, StyleSheet, + View, ViewStyle, } from 'react-native'; diff --git a/src/components/HeadlinesWidget.tsx b/src/components/HeadlinesWidget.tsx index dececb746..d1f5a0c0b 100644 --- a/src/components/HeadlinesWidget.tsx +++ b/src/components/HeadlinesWidget.tsx @@ -1,18 +1,18 @@ +import Reader from '@synonymdev/slashtags-widget-news-feed/lib/reader'; import React, { memo, ReactElement, useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { - View, - TouchableOpacity, - StyleSheet, StyleProp, + StyleSheet, + TouchableOpacity, + View, ViewStyle, } from 'react-native'; -import { useTranslation } from 'react-i18next'; -import Reader from '@synonymdev/slashtags-widget-news-feed/lib/reader'; +import { useSlashtags } from '../hooks/slashtags'; import { BodyM, CaptionB, Title } from '../styles/text'; import { openAppURL, timeAgo } from '../utils/helpers'; import { showToast } from '../utils/notifications'; -import { useSlashtags } from '../hooks/slashtags'; import BaseFeedWidget from './BaseFeedWidget'; type Article = { diff --git a/src/components/HourglassSpinner.tsx b/src/components/HourglassSpinner.tsx index d211ed631..be9c7c9e9 100644 --- a/src/components/HourglassSpinner.tsx +++ b/src/components/HourglassSpinner.tsx @@ -1,16 +1,16 @@ import React, { ReactElement } from 'react'; import { - View, - StyleSheet, - StyleProp, - ViewStyle, Image, ImageSourcePropType, + StyleProp, + StyleSheet, + View, + ViewStyle, } from 'react-native'; import { Easing, withRepeat, withTiming } from 'react-native-reanimated'; -import { AnimatedView } from '../styles/components'; import { __E2E__ } from '../constants/env'; +import { AnimatedView } from '../styles/components'; const imageSrc = require('../assets/illustrations/hourglass.png'); diff --git a/src/components/ImageText.tsx b/src/components/ImageText.tsx index 3ea4b5f30..1b09d35e4 100644 --- a/src/components/ImageText.tsx +++ b/src/components/ImageText.tsx @@ -1,8 +1,8 @@ import React, { memo, ReactElement } from 'react'; -import { View, TouchableOpacity, StyleSheet } from 'react-native'; -import { BodyMSB, BodySSB } from '../styles/text'; -import { PencilIcon } from '../styles/icons'; +import { StyleSheet, TouchableOpacity, View } from 'react-native'; import Money from '../components/Money'; +import { PencilIcon } from '../styles/icons'; +import { BodyMSB, BodySSB } from '../styles/text'; const ImageText = ({ title, diff --git a/src/components/InactivityTracker.tsx b/src/components/InactivityTracker.tsx index a546cffbe..b5439212f 100644 --- a/src/components/InactivityTracker.tsx +++ b/src/components/InactivityTracker.tsx @@ -5,13 +5,13 @@ import React, { useMemo, useRef, } from 'react'; -import { View, PanResponder, StyleSheet, Keyboard } from 'react-native'; +import { Keyboard, PanResponder, StyleSheet, View } from 'react-native'; import { useAppDispatch, useAppSelector } from '../hooks/redux'; -import { updateUi } from '../store/slices/ui'; +import { __E2E__ } from '../constants/env'; import { pinOnIdleSelector, pinSelector } from '../store/reselect/settings'; import { isAuthenticatedSelector } from '../store/reselect/ui'; -import { __E2E__ } from '../constants/env'; +import { updateUi } from '../store/slices/ui'; const INACTIVITY_DELAY = __E2E__ ? 5000 : 1000 * 90; // 90 seconds; diff --git a/src/components/InfoScreen.tsx b/src/components/InfoScreen.tsx index 0e2b7f4ec..802edf28f 100644 --- a/src/components/InfoScreen.tsx +++ b/src/components/InfoScreen.tsx @@ -1,11 +1,11 @@ import React, { ReactElement } from 'react'; -import { View, Image, ImageSourcePropType, StyleSheet } from 'react-native'; +import { Image, ImageSourcePropType, StyleSheet, View } from 'react-native'; -import { Display, BodyM } from '../styles/text'; import { View as ThemedView } from '../styles/components'; +import { BodyM, Display } from '../styles/text'; +import NavigationHeader from './NavigationHeader'; import SafeAreaInset from './SafeAreaInset'; import Button from './buttons/Button'; -import NavigationHeader from './NavigationHeader'; const InfoScreen = ({ navTitle, diff --git a/src/components/IntroScreen.tsx b/src/components/IntroScreen.tsx index 338951725..ff8012594 100644 --- a/src/components/IntroScreen.tsx +++ b/src/components/IntroScreen.tsx @@ -1,12 +1,12 @@ import React, { ReactElement } from 'react'; -import { Image, ImageSourcePropType, StyleSheet, View } from 'react-native'; import { Trans, useTranslation } from 'react-i18next'; +import { Image, ImageSourcePropType, StyleSheet, View } from 'react-native'; -import { Display, BodyM } from '../styles/text'; +import { IColors } from '../styles/colors'; import { View as ThemedView } from '../styles/components'; +import { BodyM, Display } from '../styles/text'; import SafeAreaInset from './SafeAreaInset'; import Button from './buttons/Button'; -import { IColors } from '../styles/colors'; const IntroScreen = ({ accentColor, diff --git a/src/components/Jdenticon.tsx b/src/components/Jdenticon.tsx index 9e473caaa..82b08ef99 100644 --- a/src/components/Jdenticon.tsx +++ b/src/components/Jdenticon.tsx @@ -1,5 +1,5 @@ -import React, { ReactElement } from 'react'; import jdenticon, { JdenticonConfig } from 'jdenticon'; +import React, { ReactElement } from 'react'; import { SvgXml } from 'react-native-svg'; const Jdenticon = ({ diff --git a/src/components/KeyboardAvoidingView.tsx b/src/components/KeyboardAvoidingView.tsx index ce7d1e4e8..617e3b9f2 100644 --- a/src/components/KeyboardAvoidingView.tsx +++ b/src/components/KeyboardAvoidingView.tsx @@ -1,10 +1,10 @@ import React, { ReactElement } from 'react'; -import Animated from 'react-native-reanimated'; import { + KeyboardAvoidingViewProps, Platform, KeyboardAvoidingView as RNKeyboardAvoidingView, - KeyboardAvoidingViewProps, } from 'react-native'; +import Animated from 'react-native-reanimated'; import useKeyboard from '../hooks/keyboard'; diff --git a/src/components/LabeledInput.tsx b/src/components/LabeledInput.tsx index 621816f32..96dfa18a2 100644 --- a/src/components/LabeledInput.tsx +++ b/src/components/LabeledInput.tsx @@ -1,7 +1,7 @@ import React, { ReactElement, RefObject } from 'react'; -import { View, StyleSheet, ViewStyle, StyleProp } from 'react-native'; -import { TextInput, BottomSheetTextInput } from '../styles/components'; -import { Caption13Up, BodyS } from '../styles/text'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; +import { BottomSheetTextInput, TextInput } from '../styles/components'; +import { BodyS, Caption13Up } from '../styles/text'; import { IThemeColors } from '../styles/themes'; type LabeledInputProps = { diff --git a/src/components/LightningChannel.tsx b/src/components/LightningChannel.tsx index 1c763ef1b..a955bde74 100644 --- a/src/components/LightningChannel.tsx +++ b/src/components/LightningChannel.tsx @@ -1,12 +1,12 @@ import React, { ReactElement, memo } from 'react'; -import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { useTranslation } from 'react-i18next'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { Caption13Up } from '../styles/text'; -import { DownArrow, UpArrow } from '../styles/icons'; +import { EUnit } from '../store/types/wallet'; import { View as ThemedView } from '../styles/components'; +import { DownArrow, UpArrow } from '../styles/icons'; +import { Caption13Up } from '../styles/text'; import { IThemeColors } from '../styles/themes'; -import { EUnit } from '../store/types/wallet'; import Money from './Money'; export type TStatus = 'pending' | 'open' | 'closed'; diff --git a/src/components/LightningSyncing.tsx b/src/components/LightningSyncing.tsx index 823028237..bc1cfd74f 100644 --- a/src/components/LightningSyncing.tsx +++ b/src/components/LightningSyncing.tsx @@ -1,4 +1,5 @@ import React, { ReactElement, useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { Image, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { Easing, @@ -8,17 +9,16 @@ import { withRepeat, withTiming, } from 'react-native-reanimated'; -import { useTranslation } from 'react-i18next'; -import { BodyM, BodySSB } from '../styles/text'; +import { __E2E__ } from '../constants/env'; +import { useAppSelector } from '../hooks/redux'; +import { isLDKReadySelector } from '../store/reselect/ui'; import { AnimatedView } from '../styles/components'; -import SafeAreaInset from './SafeAreaInset'; +import { BodyM, BodySSB } from '../styles/text'; import BottomSheetNavigationHeader from './BottomSheetNavigationHeader'; import GradientView from './GradientView'; +import SafeAreaInset from './SafeAreaInset'; import SyncSpinner from './SyncSpinner'; -import { useAppSelector } from '../hooks/redux'; -import { isLDKReadySelector } from '../store/reselect/ui'; -import { __E2E__ } from '../constants/env'; const imageSrc = require('../assets/illustrations/lightning.png'); diff --git a/src/components/List.tsx b/src/components/List.tsx index 0a65198a4..1480df4d2 100644 --- a/src/components/List.tsx +++ b/src/components/List.tsx @@ -1,27 +1,27 @@ +import isEqual from 'lodash/isEqual'; import React, { memo, ReactElement, useCallback } from 'react'; import { - View, + ActivityIndicator, SectionList, StyleProp, StyleSheet, - ViewStyle, TouchableOpacity, - ActivityIndicator, + View, + ViewStyle, } from 'react-native'; import { SvgProps } from 'react-native-svg'; -import isEqual from 'lodash/isEqual'; +import Switch from '../components/Switch'; +import DraggableList from '../screens/Settings/PaymentPreference/DraggableList'; +import { Checkmark, ChevronRight } from '../styles/icons'; import { BodyM, BodyMSB, BodyS, BodySSB, - Caption13Up, Caption, + Caption13Up, } from '../styles/text'; -import { ChevronRight, Checkmark } from '../styles/icons'; -import Switch from '../components/Switch'; -import DraggableList from '../screens/Settings/PaymentPreference/DraggableList'; const _SectionHeader = memo( ({ diff --git a/src/components/LoadingView.tsx b/src/components/LoadingView.tsx index 18c39d322..b66b65c3c 100644 --- a/src/components/LoadingView.tsx +++ b/src/components/LoadingView.tsx @@ -1,5 +1,5 @@ import React, { ReactElement, memo, useEffect, useState } from 'react'; -import { View, StyleProp, StyleSheet, ViewStyle } from 'react-native'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import Animated, { cancelAnimation, Easing, diff --git a/src/components/LuganoFeedWidget.tsx b/src/components/LuganoFeedWidget.tsx index 2478448bd..ecb23e4d9 100644 --- a/src/components/LuganoFeedWidget.tsx +++ b/src/components/LuganoFeedWidget.tsx @@ -1,21 +1,21 @@ import React, { memo, ReactElement, useEffect, useState } from 'react'; import { - View, - StyleSheet, - StyleProp, - ViewStyle, Image, + StyleProp, + StyleSheet, TouchableOpacity, + View, + ViewStyle, } from 'react-native'; -import { CaptionB, BodyMSB, BodySSB } from '../styles/text'; -import BaseFeedWidget from './BaseFeedWidget'; +import { BodyMSB, BodySSB, CaptionB } from '../styles/text'; import { openURL } from '../utils/helpers'; +import BaseFeedWidget from './BaseFeedWidget'; +import { useAppSelector } from '../hooks/redux'; import { useSlashfeed } from '../hooks/widgets'; -import Button from './buttons/Button'; import { CalendarIcon, MapPinLineIcon, MapTrifoldIcon } from '../styles/icons'; -import { useAppSelector } from '../hooks/redux'; +import Button from './buttons/Button'; const cache = { banner: '', diff --git a/src/components/Money.tsx b/src/components/Money.tsx index 91ed02565..7005ff414 100644 --- a/src/components/Money.tsx +++ b/src/components/Money.tsx @@ -1,25 +1,25 @@ import React, { memo, ReactElement, useMemo } from 'react'; import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; +import { useDisplayValues } from '../hooks/displayValues'; +import { useAppSelector } from '../hooks/redux'; +import { + denominationSelector, + hideBalanceSelector, + nextUnitSelector, + unitSelector, +} from '../store/reselect/settings'; +import { EDenomination, EUnit } from '../store/types/wallet'; import { - CaptionB, - Caption13Up, - Display, BodyMSB, BodySSB, + Caption13Up, + CaptionB, + Display, Title, } from '../styles/text'; import { IThemeColors } from '../styles/themes'; -import { useAppSelector } from '../hooks/redux'; -import { useDisplayValues } from '../hooks/displayValues'; import { abbreviateNumber } from '../utils/helpers'; -import { EDenomination, EUnit } from '../store/types/wallet'; -import { - unitSelector, - hideBalanceSelector, - denominationSelector, - nextUnitSelector, -} from '../store/reselect/settings'; type TSize = | 'display' diff --git a/src/components/NavigationHeader.tsx b/src/components/NavigationHeader.tsx index 77c5e0246..6a144f7f8 100644 --- a/src/components/NavigationHeader.tsx +++ b/src/components/NavigationHeader.tsx @@ -1,18 +1,18 @@ +import { useNavigation } from '@react-navigation/native'; import React, { memo, ReactElement, useCallback, useMemo } from 'react'; import { - View, + GestureResponderEvent, StyleProp, StyleSheet, + View, ViewStyle, - GestureResponderEvent, } from 'react-native'; -import { useNavigation } from '@react-navigation/native'; -import { Subtitle, Title } from '../styles/text'; -import { BackIcon, XIcon } from '../styles/icons'; import { Keyboard } from '../hooks/keyboard'; -import { Pressable } from '../styles/components'; import { RootNavigationProp } from '../navigation/types'; +import { Pressable } from '../styles/components'; +import { BackIcon, XIcon } from '../styles/icons'; +import { Subtitle, Title } from '../styles/text'; export const HEADER_HEIGHT = 46; diff --git a/src/components/NumberPad.tsx b/src/components/NumberPad.tsx index 15c017975..d9a9f891e 100644 --- a/src/components/NumberPad.tsx +++ b/src/components/NumberPad.tsx @@ -1,8 +1,8 @@ import React, { memo, ReactElement } from 'react'; -import { View, StyleSheet, ViewStyle, StyleProp } from 'react-native'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; import { Pressable } from '../styles/components'; -import { Text } from '../styles/text'; import { BackspaceIcon } from '../styles/icons'; +import { Text } from '../styles/text'; import { vibrate } from '../utils/helpers'; const ACTIVE_OPACITY = 0.2; diff --git a/src/components/NumberPadTextField.tsx b/src/components/NumberPadTextField.tsx index db8ec9246..fca84acfd 100644 --- a/src/components/NumberPadTextField.tsx +++ b/src/components/NumberPadTextField.tsx @@ -1,5 +1,4 @@ import React, { memo, ReactElement } from 'react'; -import { useAppSelector } from '../hooks/redux'; import { Pressable, StyleProp, @@ -7,21 +6,22 @@ import { View, ViewStyle, } from 'react-native'; +import { useAppSelector } from '../hooks/redux'; -import { Display } from '../styles/text'; -import Money from './Money'; -import { EDenomination, EUnit } from '../store/types/wallet'; +import { useCurrency } from '../hooks/displayValues'; import { conversionUnitSelector, denominationSelector, unitSelector, } from '../store/reselect/settings'; +import { EDenomination, EUnit } from '../store/types/wallet'; +import { Display } from '../styles/text'; import { convertToSats } from '../utils/conversion'; -import { useCurrency } from '../hooks/displayValues'; import { getDisplayValues, getFiatDisplayValuesForFiat, } from '../utils/displayValues'; +import Money from './Money'; const NumberPadTextField = ({ value, diff --git a/src/components/OnboardingScreen.tsx b/src/components/OnboardingScreen.tsx index 3e422dd5a..8617af519 100644 --- a/src/components/OnboardingScreen.tsx +++ b/src/components/OnboardingScreen.tsx @@ -1,11 +1,11 @@ import React, { ReactElement } from 'react'; -import { View, Image, ImageSourcePropType, StyleSheet } from 'react-native'; +import { Image, ImageSourcePropType, StyleSheet, View } from 'react-native'; -import { Display, BodyM, Title } from '../styles/text'; import { View as ThemedView } from '../styles/components'; +import { BodyM, Display, Title } from '../styles/text'; +import NavigationHeader from './NavigationHeader'; import SafeAreaInset from './SafeAreaInset'; import Button from './buttons/Button'; -import NavigationHeader from './NavigationHeader'; const OnboardingScreen = ({ navTitle, diff --git a/src/components/Percentage.tsx b/src/components/Percentage.tsx index 370a1f2b9..ae4b83cd6 100644 --- a/src/components/Percentage.tsx +++ b/src/components/Percentage.tsx @@ -1,7 +1,7 @@ import React, { ReactElement } from 'react'; import { Platform, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { Headline, BodyMB } from '../styles/text'; import { BitcoinCircleIcon, LightningCircleIcon } from '../styles/icons'; +import { BodyMB, Headline } from '../styles/text'; type PercentageProps = { value: number; diff --git a/src/components/PriceChart.tsx b/src/components/PriceChart.tsx index 914d13051..9693b2614 100644 --- a/src/components/PriceChart.tsx +++ b/src/components/PriceChart.tsx @@ -1,30 +1,30 @@ -import React, { useState, ReactElement, useEffect, useMemo } from 'react'; -import { - View, - StyleProp, - StyleSheet, - ViewStyle, - useWindowDimensions, -} from 'react-native'; import { - Skia, Canvas, + CornerPathEffect, LinearGradient, - vec, + Mask, Path, - CornerPathEffect, + Rect, + Skia, Text, useFont, - Mask, - Rect, + vec, } from '@shopify/react-native-skia'; import { Reader } from '@synonymdev/slashtags-widget-price-feed'; import { Pair } from '@synonymdev/slashtags-widget-price-feed/types/lib/reader'; +import React, { useState, ReactElement, useEffect, useMemo } from 'react'; +import { + StyleProp, + StyleSheet, + View, + ViewStyle, + useWindowDimensions, +} from 'react-native'; -import { IThemeColors } from '../styles/themes'; -import { SlashFeedJSON, TGraphPeriod } from '../store/types/widgets'; import useColors from '../hooks/colors'; import { useSlashtags } from '../hooks/slashtags'; +import { SlashFeedJSON, TGraphPeriod } from '../store/types/widgets'; +import { IThemeColors } from '../styles/themes'; export type Change = { color: keyof IThemeColors; diff --git a/src/components/PriceWidget.tsx b/src/components/PriceWidget.tsx index 681b497af..abbb99bfa 100644 --- a/src/components/PriceWidget.tsx +++ b/src/components/PriceWidget.tsx @@ -1,17 +1,17 @@ -import React, { memo, ReactElement, useEffect, useState } from 'react'; -import { View, StyleProp, StyleSheet, ViewStyle } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { Reader } from '@synonymdev/slashtags-widget-price-feed'; import { Pair } from '@synonymdev/slashtags-widget-price-feed/types/lib/reader'; +import React, { memo, ReactElement, useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { CaptionB, BodySSB } from '../styles/text'; +import { __E2E__ } from '../constants/env'; +import { useSlashtags } from '../hooks/slashtags'; import { useSlashfeed } from '../hooks/widgets'; import { TFeedWidget } from '../store/types/widgets'; +import { BodySSB, CaptionB } from '../styles/text'; +import { SUPPORTED_FEED_TYPES, decodeWidgetFieldValue } from '../utils/widgets'; import BaseFeedWidget from './BaseFeedWidget'; import { Change, Chart, getChange } from './PriceChart'; -import { decodeWidgetFieldValue, SUPPORTED_FEED_TYPES } from '../utils/widgets'; -import { useSlashtags } from '../hooks/slashtags'; -import { __E2E__ } from '../constants/env'; type TField = { name: string; diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index 3be855198..912ace9a6 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -1,22 +1,22 @@ import React, { ReactElement, useRef } from 'react'; +import { useTranslation } from 'react-i18next'; import { - View, - TouchableOpacity, - TextInput, - StyleSheet, Platform, + StyleSheet, + TextInput, + TouchableOpacity, + View, } from 'react-native'; import { launchImageLibrary } from 'react-native-image-picker'; -import { useTranslation } from 'react-i18next'; import { useTheme } from 'styled-components/native'; +import { BasicProfile } from '../store/types/slashtags'; import { TextInputNoOutline } from '../styles/components'; -import { Text, Headline } from '../styles/text'; import { CameraIcon } from '../styles/icons'; +import { Headline, Text } from '../styles/text'; +import { truncate } from '../utils/helpers'; import ProfileImage from './ProfileImage'; import SlashtagURL from './SlashtagURL'; -import { BasicProfile } from '../store/types/slashtags'; -import { truncate } from '../utils/helpers'; export const MAX_NAME_LENGTH = 50; export const MAX_BIO_LENGTH = 160; diff --git a/src/components/ProfileImage.tsx b/src/components/ProfileImage.tsx index 7bfcaabde..693e5aa6f 100644 --- a/src/components/ProfileImage.tsx +++ b/src/components/ProfileImage.tsx @@ -2,8 +2,8 @@ import React, { useMemo } from 'react'; import { Image, StyleProp, View, ViewStyle } from 'react-native'; import { SvgXml } from 'react-native-svg'; -import { BasicProfile } from '../store/types/slashtags'; import useColors from '../hooks/colors'; +import { BasicProfile } from '../store/types/slashtags'; import Jdenticon from './Jdenticon'; const ProfileImage = ({ diff --git a/src/components/ProfileLinks.tsx b/src/components/ProfileLinks.tsx index 18782457c..afa8d2f62 100644 --- a/src/components/ProfileLinks.tsx +++ b/src/components/ProfileLinks.tsx @@ -1,22 +1,22 @@ import React, { ReactElement } from 'react'; +import { useTranslation } from 'react-i18next'; import { - View, - TouchableOpacity, StyleProp, StyleSheet, + TouchableOpacity, + View, ViewStyle, } from 'react-native'; -import { useTranslation } from 'react-i18next'; -import { Caption13Up, BodySSB, BodyS } from '../styles/text'; -import { TrashIcon } from '../styles/icons'; -import { LocalLink } from '../store/types/slashtags'; import { useAppDispatch } from '../hooks/redux'; -import { editLink, deleteLink } from '../store/slices/slashtags'; -import LabeledInput from './LabeledInput'; -import Divider from './Divider'; import { suggestions } from '../screens/Profile/ProfileLinkSuggestions'; +import { deleteLink, editLink } from '../store/slices/slashtags'; +import { LocalLink } from '../store/types/slashtags'; +import { TrashIcon } from '../styles/icons'; +import { BodyS, BodySSB, Caption13Up } from '../styles/text'; import { openAppURL } from '../utils/helpers'; +import Divider from './Divider'; +import LabeledInput from './LabeledInput'; const trimLink = (link: LocalLink): string => { let trimmedUrl = link.url; diff --git a/src/components/ProgressSteps.tsx b/src/components/ProgressSteps.tsx index a5eba16f1..ea7cf2492 100644 --- a/src/components/ProgressSteps.tsx +++ b/src/components/ProgressSteps.tsx @@ -1,9 +1,9 @@ import React, { Fragment, ReactElement } from 'react'; import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; -import { BodySSB } from '../styles/text'; -import { Checkmark } from '../styles/icons'; import useColors from '../hooks/colors'; +import { Checkmark } from '../styles/icons'; +import { BodySSB } from '../styles/text'; type Step = { title: string }; diff --git a/src/components/SafeAreaView.tsx b/src/components/SafeAreaView.tsx index de78cba42..9cfbfb927 100644 --- a/src/components/SafeAreaView.tsx +++ b/src/components/SafeAreaView.tsx @@ -1,11 +1,11 @@ import React, { memo, useMemo, ReactElement } from 'react'; import { StyleProp, StyleSheet, ViewStyle } from 'react-native'; -import { useAppSelector } from '../hooks/redux'; import { Edge, NativeSafeAreaViewProps, SafeAreaView as SafeAreaViewRN, } from 'react-native-safe-area-context'; +import { useAppSelector } from '../hooks/redux'; import { themeColorsSelector } from '../store/reselect/settings'; type SafeAreaViewProps = NativeSafeAreaViewProps & { diff --git a/src/components/SearchInput.tsx b/src/components/SearchInput.tsx index 41f7c8020..8cb36c19f 100644 --- a/src/components/SearchInput.tsx +++ b/src/components/SearchInput.tsx @@ -1,13 +1,13 @@ import React, { ReactElement, memo } from 'react'; +import { useTranslation } from 'react-i18next'; import { + Platform, StyleProp, StyleSheet, - Platform, TextInputProps, View, ViewStyle, } from 'react-native'; -import { useTranslation } from 'react-i18next'; import { TextInput, View as ThemedView } from '../styles/components'; import { MagnifyingGlassIcon } from '../styles/icons'; diff --git a/src/components/SeedInput.tsx b/src/components/SeedInput.tsx index 239567d52..7f6bc57d6 100644 --- a/src/components/SeedInput.tsx +++ b/src/components/SeedInput.tsx @@ -1,6 +1,6 @@ import React, { forwardRef } from 'react'; import { StyleSheet, TextInputProps } from 'react-native'; -import { View as ThemedView, TextInput } from '../styles/components'; +import { TextInput, View as ThemedView } from '../styles/components'; import { BodyMSB } from '../styles/text'; type SeedInputProps = TextInputProps & { index: number; valid?: boolean }; diff --git a/src/components/SeedInputAccessory.tsx b/src/components/SeedInputAccessory.tsx index 3175ed9d4..a6870eed4 100644 --- a/src/components/SeedInputAccessory.tsx +++ b/src/components/SeedInputAccessory.tsx @@ -1,11 +1,11 @@ +import * as bip39 from 'bip39'; import React, { ReactElement, useEffect, useState } from 'react'; import { StyleSheet, View } from 'react-native'; -import * as bip39 from 'bip39'; import { KeyboardAccessoryView } from 'react-native-keyboard-accessory'; -import Button, { ButtonProps } from './buttons/Button'; import { Text13UP } from '../styles/text'; import seedSuggestions from '../utils/seed-suggestions'; +import Button, { ButtonProps } from './buttons/Button'; const Word = (props: ButtonProps): ReactElement => { return