refactor src folder structure
This commit is contained in:
parent
0bfb70af8b
commit
d0e26e2882
30 changed files with 94 additions and 134 deletions
|
@ -10,9 +10,9 @@ import RenderHtml from 'react-native-render-html';
|
|||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
|
||||
export default function CategoryScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -6,16 +6,16 @@ import DeviceInfo from 'react-native-device-info';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import Ionicons from '@expo/vector-icons/Ionicons';
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { useToken } from '@/lib/context/AppProvider';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { Message } from '@/lib/services/message';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { setSession } from '@/lib/store/dataStore';
|
||||
import ThemedInput from '@/lib/components/ThemedInput';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { useToken } from '@/src/context/AppProvider';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { Message } from '@/src/services/message';
|
||||
import { Request } from '@/src/services/request';
|
||||
import { store } from '@/src/store/store';
|
||||
import { setSession } from '@/src/store/dataStore';
|
||||
import ThemedInput from '@/src/components/themed/ThemedInput';
|
||||
|
||||
export default function OnboardStartScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -5,16 +5,16 @@ import { DateTimePickerAndroid, DateTimePickerEvent } from '@react-native-commun
|
|||
import { useSelector } from 'react-redux';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import { useToken } from '@/lib/context/AppProvider';
|
||||
import { Message } from '@/lib/services/message';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { setSession } from '@/lib/store/dataStore';
|
||||
import { ThemedIcon } from '@/lib/components/ThemedIcon';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { Request } from '@/src/services/request';
|
||||
import { useToken } from '@/src/context/AppProvider';
|
||||
import { Message } from '@/src/services/message';
|
||||
import { store } from '@/src/store/store';
|
||||
import { setSession } from '@/src/store/dataStore';
|
||||
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
||||
|
||||
export default function CategoryScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Tabs } from 'expo-router';
|
||||
import React from 'react';
|
||||
|
||||
import { TabBarIcon } from '@/lib/components/navigation/TabBarIcon';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { TabBarIcon } from '@/src/components/navigation/TabBarIcon';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
|
||||
export default function TabLayout() {
|
||||
const colorScheme = useColorScheme();
|
||||
|
|
|
@ -14,14 +14,14 @@ import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown';
|
|||
import Modal from "react-native-modal";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import List from '@/lib/components/List';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { setViewCategory } from '@/lib/store/dataStore';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { Request } from '@/src/services/request';
|
||||
import List from '@/src/components/List';
|
||||
import { store } from '@/src/store/store';
|
||||
import { setViewCategory } from '@/src/store/dataStore';
|
||||
|
||||
export default function ExploreScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -7,15 +7,15 @@ import { useSelector } from 'react-redux';
|
|||
import { LogLevel, OneSignal } from 'react-native-onesignal';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { useToken } from '@/lib/context/AppProvider';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import List from '@/lib/components/List';
|
||||
import { Message } from '@/lib/services/message';
|
||||
import { ThemedIcon } from '@/lib/components/ThemedIcon';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { useToken } from '@/src/context/AppProvider';
|
||||
import { Request } from '@/src/services/request';
|
||||
import List from '@/src/components/List';
|
||||
import { Message } from '@/src/services/message';
|
||||
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
||||
|
||||
export default function HomeScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -7,12 +7,12 @@ import { useTranslation } from 'react-i18next';
|
|||
|
||||
Mapbox.setAccessToken( "pk.eyJ1IjoibWFhcnRlbnZyOTgiLCJhIjoiY2x6ZDFqMGp1MGVyejJrczhqcXpvYm9iYiJ9.XvYcL62dWiJQiFmG6mOoug" );
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import List from '@/lib/components/List';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import List from '@/src/components/List';
|
||||
import { Request } from '@/src/services/request';
|
||||
|
||||
export default function MapScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
|
|
@ -13,18 +13,18 @@ import { useTranslation } from 'react-i18next';
|
|||
import { BottomSheet, BottomSheetRefType } from 'react-native-select-bottom-list';
|
||||
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { Colors } from '@/lib/constants/Colors';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { useToken } from '@/lib/context/AppProvider';
|
||||
import { Message } from '@/lib/services/message';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import CustomModal from '@/lib/components/EditModal';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { setSession, setReloadCalendar } from '@/lib/store/dataStore';
|
||||
import { ThemedIcon } from '@/lib/components/ThemedIcon';
|
||||
import List from '@/lib/components/List';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { Colors } from '@/src/constants/Colors';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { useToken } from '@/src/context/AppProvider';
|
||||
import { Message } from '@/src/services/message';
|
||||
import { Request } from '@/src/services/request';
|
||||
import CustomModal from '@/src/components/EditModal';
|
||||
import { store } from '@/src/store/store';
|
||||
import { setSession, setReloadCalendar } from '@/src/store/dataStore';
|
||||
import { ThemedIcon } from '@/src/components/themed/ThemedIcon';
|
||||
import List from '@/src/components/List';
|
||||
|
||||
export default function SettingsScreen() {
|
||||
const colorScheme = useColorScheme() ?? 'light';
|
||||
|
@ -266,20 +266,14 @@ export default function SettingsScreen() {
|
|||
]}
|
||||
viewStyle={styles.languagesList}
|
||||
renderItem={(item: any, index: any) => (
|
||||
<ThemedView>
|
||||
{item.key === language ?
|
||||
(
|
||||
<TouchableOpacity style={styles.languagesListItem} key={index} onPress={() => changeLanguage( item.key )}>
|
||||
<ThemedText type="defaultSemiBold">{item.name}</ThemedText>
|
||||
<ThemedIcon name="checkmark" size={18}/>
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<TouchableOpacity style={styles.languagesListItem} key={index} onPress={() => changeLanguage( item.key )}>
|
||||
<ThemedText type="default">{item.name}</ThemedText>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
<TouchableOpacity style={styles.languagesListItem} key={index} onPress={() => changeLanguage( item.key )}>
|
||||
<ThemedText type={item.key === language ? 'defaultSemiBold' : 'default'}>{item.name}</ThemedText>
|
||||
|
||||
{item.key === language &&
|
||||
<ThemedIcon name="checkmark" size={18}/>
|
||||
}
|
||||
</ThemedView>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
/>
|
||||
</ThemedView>
|
||||
|
|
|
@ -7,9 +7,9 @@ import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native
|
|||
import Toast from 'react-native-toast-message';
|
||||
import { AutocompleteDropdownContextProvider } from 'react-native-autocomplete-dropdown';
|
||||
|
||||
import { AppProvider } from '@/lib/context/AppProvider';
|
||||
import { useColorScheme } from '@/lib/hooks/useColorScheme';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { AppProvider } from '@/src/context/AppProvider';
|
||||
import { useColorScheme } from '@/src/hooks/useColorScheme';
|
||||
import { store } from '@/src/store/store';
|
||||
|
||||
// Prevent the splash screen from auto-hiding before asset loading is complete.
|
||||
SplashScreen.preventAutoHideAsync();
|
||||
|
|
|
@ -2,14 +2,14 @@ import React, { useEffect } from 'react';
|
|||
import { Redirect, useRouter } from 'expo-router';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import '@/lib/localization/i18n';
|
||||
import '@/src/localization/i18n';
|
||||
|
||||
import { ThemedText } from '@/lib/components/ThemedText';
|
||||
import { ThemedView } from '@/lib/components/ThemedView';
|
||||
import { useToken } from '@/lib/context/AppProvider';
|
||||
import { Request } from '@/lib/services/request';
|
||||
import { store } from '@/lib/store/store';
|
||||
import { setSession } from '@/lib/store/dataStore';
|
||||
import { ThemedText } from '@/src/components/themed/ThemedText';
|
||||
import { ThemedView } from '@/src/components/themed/ThemedView';
|
||||
import { useToken } from '@/src/context/AppProvider';
|
||||
import { Request } from '@/src/services/request';
|
||||
import { store } from '@/src/store/store';
|
||||
import { setSession } from '@/src/store/dataStore';
|
||||
|
||||
export default function OnboardStartScreen() {
|
||||
const { token, isLoading } = useToken();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue