From 87bbcc190c954d8c195d1021b66180ee71440b71 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Tue, 11 Jul 2023 12:25:56 +0300 Subject: [PATCH] Organize imports Signed-off-by: Nikolaos Karaolidis --- src/app.tsx | 2 +- src/contexts/settings.tsx | 12 +++++------- src/screens/index.ts | 3 ++- src/screens/welcome.tsx | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index ff3fac1..a169997 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -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(); diff --git a/src/contexts/settings.tsx b/src/contexts/settings.tsx index 4c03bb3..baabce7 100644 --- a/src/contexts/settings.tsx +++ b/src/contexts/settings.tsx @@ -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 }) { {hasLoaded ? ( settings.storageUri === '' ? ( - { void openDocumentTree(true).then(uri => { updateSettings({ storageUri: uri.uri }); diff --git a/src/screens/index.ts b/src/screens/index.ts index 90a4ae5..3bf9496 100644 --- a/src/screens/index.ts +++ b/src/screens/index.ts @@ -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'; diff --git a/src/screens/welcome.tsx b/src/screens/welcome.tsx index 59f8aae..6b3739f 100644 --- a/src/screens/welcome.tsx +++ b/src/screens/welcome.tsx @@ -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 ( void }) => { ); }; -export default WelcomeScreen; +export default Welcome;