Move context files into own folder

This commit is contained in:
Arnaud Vergnet 2021-05-15 11:41:17 +02:00
parent 1d2ec83619
commit b5d4ad83c3
13 changed files with 11 additions and 11 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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