Browse Source

Move context files into own folder

Arnaud Vergnet 6 months ago
parent
commit
b5d4ad83c3

+ 1
- 1
src/components/Animations/PlanexBottomBar.tsx View File

@@ -23,7 +23,7 @@ import { FAB, IconButton, Surface, useTheme } from 'react-native-paper';
23 23
 import * as Animatable from 'react-native-animatable';
24 24
 import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar';
25 25
 import { useNavigation } from '@react-navigation/core';
26
-import { useCollapsible } from '../../utils/CollapsibleContext';
26
+import { useCollapsible } from '../../context/CollapsibleContext';
27 27
 
28 28
 type Props = {
29 29
   onPress: (action: string, data?: string) => void;

+ 1
- 1
src/components/Collapsible/CollapsibleComponent.tsx View File

@@ -26,7 +26,7 @@ import {
26 26
   StyleSheet,
27 27
 } from 'react-native';
28 28
 import { useTheme } from 'react-native-paper';
29
-import { useCollapsible } from '../../utils/CollapsibleContext';
29
+import { useCollapsible } from '../../context/CollapsibleContext';
30 30
 import { useFocusEffect } from '@react-navigation/core';
31 31
 
32 32
 export type CollapsibleComponentPropsType = {

+ 1
- 1
src/components/Screens/WebViewScreen.tsx View File

@@ -46,7 +46,7 @@ import MaterialHeaderButtons, { Item } from '../Overrides/CustomHeaderButton';
46 46
 import ErrorView from './ErrorView';
47 47
 import BasicLoadingScreen from './BasicLoadingScreen';
48 48
 import { useFocusEffect, useNavigation } from '@react-navigation/core';
49
-import { useCollapsible } from '../../utils/CollapsibleContext';
49
+import { useCollapsible } from '../../context/CollapsibleContext';
50 50
 import { REQUEST_STATUS } from '../../utils/Requests';
51 51
 
52 52
 type Props = {

+ 1
- 1
src/components/Tabbar/CustomTabBar.tsx View File

@@ -22,7 +22,7 @@ import type { BottomTabBarProps } from '@react-navigation/bottom-tabs';
22 22
 import { Animated, StyleSheet } from 'react-native';
23 23
 import TabIcon from './TabIcon';
24 24
 import { useTheme } from 'react-native-paper';
25
-import { useCollapsible } from '../../utils/CollapsibleContext';
25
+import { useCollapsible } from '../../context/CollapsibleContext';
26 26
 
27 27
 export const TAB_BAR_HEIGHT = 50;
28 28
 

+ 1
- 1
src/components/providers/CacheProvider.tsx View File

@@ -3,7 +3,7 @@ import {
3 3
   CacheContext,
4 4
   CacheContextType,
5 5
   CacheType,
6
-} from '../../utils/cacheContext';
6
+} from '../../context/cacheContext';
7 7
 
8 8
 type Props = {
9 9
   children: React.ReactChild;

+ 1
- 1
src/components/providers/CollapsibleProvider.tsx View File

@@ -3,7 +3,7 @@ import { Collapsible } from 'react-navigation-collapsible';
3 3
 import {
4 4
   CollapsibleContext,
5 5
   CollapsibleContextType,
6
-} from '../../utils/CollapsibleContext';
6
+} from '../../context/CollapsibleContext';
7 7
 
8 8
 type Props = {
9 9
   children: React.ReactChild;

+ 1
- 1
src/components/providers/PreferencesProvider.tsx View File

@@ -8,7 +8,7 @@ import {
8 8
 import {
9 9
   PreferencesContext,
10 10
   PreferencesContextType,
11
-} from '../../utils/preferencesContext';
11
+} from '../../context/preferencesContext';
12 12
 
13 13
 type Props = {
14 14
   children: React.ReactChild;

src/utils/CollapsibleContext.ts → src/context/CollapsibleContext.ts View File


src/utils/cacheContext.ts → src/context/cacheContext.ts View File


src/utils/preferencesContext.ts → src/context/preferencesContext.ts View File

@@ -3,7 +3,7 @@ import {
3 3
   defaultPreferences,
4 4
   PreferenceKeys,
5 5
   PreferencesType,
6
-} from './asyncStorage';
6
+} from '../utils/asyncStorage';
7 7
 
8 8
 export type PreferencesContextType = {
9 9
   preferences: PreferencesType;

+ 1
- 1
src/screens/Planex/GroupSelectionScreen.tsx View File

@@ -33,7 +33,7 @@ import AsyncStorageManager from '../../managers/AsyncStorageManager';
33 33
 import Urls from '../../constants/Urls';
34 34
 import { readData } from '../../utils/WebData';
35 35
 import { useNavigation } from '@react-navigation/core';
36
-import { useCachedPlanexGroups } from '../../utils/cacheContext';
36
+import { useCachedPlanexGroups } from '../../context/cacheContext';
37 37
 
38 38
 export type PlanexGroupType = {
39 39
   name: string;

+ 1
- 1
src/screens/Services/Proximo/ProximoListScreen.tsx View File

@@ -48,7 +48,7 @@ import {
48 48
   MainRoutes,
49 49
   MainStackParamsList,
50 50
 } from '../../../navigation/MainNavigator';
51
-import { useCachedProximoArticles } from '../../../utils/cacheContext';
51
+import { useCachedProximoArticles } from '../../../context/cacheContext';
52 52
 
53 53
 function sortPrice(a: ProximoArticleType, b: ProximoArticleType): number {
54 54
   return a.price - b.price;

+ 1
- 1
src/screens/Services/Proximo/ProximoMainScreen.tsx View File

@@ -30,7 +30,7 @@ import Urls from '../../../constants/Urls';
30 30
 import { readData } from '../../../utils/WebData';
31 31
 import { useNavigation } from '@react-navigation/core';
32 32
 import { useLayoutEffect } from 'react';
33
-import { useCachedProximoCategories } from '../../../utils/cacheContext';
33
+import { useCachedProximoCategories } from '../../../context/cacheContext';
34 34
 import GENERAL_STYLES from '../../../constants/Styles';
35 35
 
36 36
 const LIST_ITEM_HEIGHT = 84;

Loading…
Cancel
Save