Organize imports
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import { RealmProvider } from '@realm/react';
|
||||
import { lightTheme, darkTheme } from './theme';
|
||||
import { Meme, Tag } from './database';
|
||||
import NavigationContainer from './navigation';
|
||||
import { SettingsProvider } from './contexts/settings';
|
||||
import { SettingsProvider } from './contexts';
|
||||
|
||||
function App() {
|
||||
const colorScheme = useColorScheme();
|
||||
|
@@ -7,8 +7,6 @@ import React, {
|
||||
} from 'react';
|
||||
import { Settings } from '../types';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { LoadingView } from '../components';
|
||||
import WelcomeScreen from '../screens/welcome';
|
||||
import { AndroidScoped, FileSystem } from 'react-native-file-access';
|
||||
import {
|
||||
getPersistedUriPermissions,
|
||||
@@ -16,10 +14,10 @@ import {
|
||||
createFile,
|
||||
deleteFile,
|
||||
} from 'react-native-scoped-storage';
|
||||
import {
|
||||
clearPermissions,
|
||||
isPermissionForPath,
|
||||
} from '../utilities/permissions';
|
||||
import { Settings } from '../types';
|
||||
import { LoadingView } from '../components';
|
||||
import { Welcome } from '../screens';
|
||||
import { clearPermissions, isPermissionForPath } from '../utilities';
|
||||
|
||||
interface SettingsContextType {
|
||||
settings: Settings;
|
||||
@@ -115,7 +113,7 @@ function SettingsProvider({ children }: { children: ReactNode }) {
|
||||
<SettingsContext.Provider value={{ settings, setSettings: updateSettings }}>
|
||||
{hasLoaded ? (
|
||||
settings.storageUri === '' ? (
|
||||
<WelcomeScreen
|
||||
<Welcome
|
||||
selectStorageLocation={() => {
|
||||
void openDocumentTree(true).then(uri => {
|
||||
updateSettings({ storageUri: uri.uri });
|
||||
|
@@ -1,5 +1,6 @@
|
||||
export { default as AddItem } from './addItem';
|
||||
export { default as Home } from './home';
|
||||
export { default as Search } from './search';
|
||||
export { default as Tags } from './tags';
|
||||
export { default as Settings } from './settings';
|
||||
export { default as Tags } from './tags';
|
||||
export { default as Welcome } from './welcome';
|
||||
|
@@ -3,7 +3,7 @@ import { Button, Text } from 'react-native-paper';
|
||||
import { PaddedView } from '../components';
|
||||
import styles from '../styles';
|
||||
|
||||
const WelcomeScreen = (properties: { selectStorageLocation: () => void }) => {
|
||||
const Welcome = (properties: { selectStorageLocation: () => void }) => {
|
||||
return (
|
||||
<PaddedView centered>
|
||||
<Text
|
||||
@@ -18,4 +18,4 @@ const WelcomeScreen = (properties: { selectStorageLocation: () => void }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default WelcomeScreen;
|
||||
export default Welcome;
|
||||
|
Reference in New Issue
Block a user