1
- import React , { useState } from 'react' ;
2
- import { View , ScrollView } from 'react-native' ;
1
+ import { useState } from 'react' ;
2
+ import { ScrollView , View } from 'react-native' ;
3
3
import GestureRecognizer from 'react-native-swipe-gestures' ;
4
4
5
+ import AppButton from 'src/components/AppButton' ;
6
+ import SettingsGroup from 'src/components/SettingsGroup' ;
7
+ import storageService from 'src/services/StorageService' ;
8
+ import { paymentsSelectors } from 'src/store/slices/payments' ;
9
+ import { storageSelectors } from 'src/store/slices/storage' ;
10
+ import { useTailwind } from 'tailwind-rn' ;
5
11
import strings from '../../../assets/lang/strings' ;
6
12
import AppProgressBar from '../../components/AppProgressBar' ;
7
- import AppScreenTitle from '../../components/AppScreenTitle' ;
8
- import { useAppDispatch , useAppSelector } from '../../store/hooks' ;
9
- import { INFINITE_PLAN } from '../../types' ;
10
13
import AppScreen from '../../components/AppScreen' ;
11
- import { SettingsScreenProps } from '../../types/navigation' ;
12
- import { useTailwind } from 'tailwind-rn' ;
14
+ import AppScreenTitle from '../../components/AppScreenTitle' ;
13
15
import AppText from '../../components/AppText' ;
16
+ import { openUrl } from '../../helpers/utils' ;
14
17
import useGetColor from '../../hooks/useColor' ;
15
- import { uiActions } from 'src/store/slices/ui' ;
16
- import SettingsGroup from 'src/components/SettingsGroup' ;
17
- import storageService from 'src/services/StorageService' ;
18
- import { storageSelectors } from 'src/store/slices/storage' ;
19
- import AppButton from 'src/components/AppButton' ;
20
- import { paymentsSelectors } from 'src/store/slices/payments' ;
18
+ import { PRICING_URL } from '../../services/drive/constants' ;
19
+ import { useAppSelector } from '../../store/hooks' ;
20
+ import { INFINITE_PLAN } from '../../types' ;
21
+ import { SettingsScreenProps } from '../../types/navigation' ;
21
22
22
23
function StorageScreen ( { navigation } : SettingsScreenProps < 'Storage' > ) : JSX . Element {
23
24
const [ currentStatusStep , setCurrentStatusStep ] = useState ( 0 ) ;
@@ -30,7 +31,7 @@ function StorageScreen({ navigation }: SettingsScreenProps<'Storage'>): JSX.Elem
30
31
const usagePercent = useAppSelector ( storageSelectors . usagePercent ) ;
31
32
const tailwind = useTailwind ( ) ;
32
33
const getColor = useGetColor ( ) ;
33
- const dispatch = useAppDispatch ( ) ;
34
+
34
35
const getLimitString = ( ) => {
35
36
if ( limit === 0 ) {
36
37
return '...' ;
@@ -43,9 +44,11 @@ function StorageScreen({ navigation }: SettingsScreenProps<'Storage'>): JSX.Elem
43
44
return storageService . toString ( limit ) ;
44
45
} ;
45
46
const onBackButtonPressed = ( ) => navigation . goBack ( ) ;
47
+
46
48
const onUpgradePressed = ( ) => {
47
- dispatch ( uiActions . setIsPlansModalOpen ( true ) ) ;
49
+ openUrl ( PRICING_URL ) ;
48
50
} ;
51
+
49
52
const statusSteps = [
50
53
( ) => (
51
54
< >
0 commit comments