From ab6aa76fa2de26a891d80284f4008538bf5d60a6 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Mon, 10 Jul 2023 09:06:41 +0300 Subject: [PATCH] Organize files Signed-off-by: Nikolaos Karaolidis --- .../{actionButton.tsx => floatingActionButton.tsx} | 4 ++-- src/components/index.ts | 1 + src/navigation.tsx | 4 ++-- src/screens/welcome.tsx | 1 - src/styles.tsx | 5 ----- 5 files changed, 5 insertions(+), 10 deletions(-) rename src/components/{actionButton.tsx => floatingActionButton.tsx} (93%) diff --git a/src/components/actionButton.tsx b/src/components/floatingActionButton.tsx similarity index 93% rename from src/components/actionButton.tsx rename to src/components/floatingActionButton.tsx index f013a51..970ef76 100644 --- a/src/components/actionButton.tsx +++ b/src/components/floatingActionButton.tsx @@ -10,7 +10,7 @@ const styles = StyleSheet.create({ }, }); -const ActionButton = () => { +const FloatingActionButton = () => { const [state, setState] = React.useState(false); return ( @@ -51,4 +51,4 @@ const ActionButton = () => { ); }; -export default ActionButton; +export default FloatingActionButton; diff --git a/src/components/index.ts b/src/components/index.ts index 7d00a61..f9f66d0 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,2 +1,3 @@ +export { default as FloatingActionButton } from './floatingActionButton'; export { default as LoadingView } from './loadingView'; export { default as PaddedView } from './paddedView'; diff --git a/src/navigation.tsx b/src/navigation.tsx index 94df399..bab51c0 100644 --- a/src/navigation.tsx +++ b/src/navigation.tsx @@ -7,7 +7,7 @@ import FontAwesome5 from 'react-native-vector-icons/FontAwesome5'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { BottomNavigation, useTheme } from 'react-native-paper'; import { Home, Search, Tags, Settings } from './screens'; -import ActionButton from './components/actionButton'; +import { FloatingActionButton } from './components'; import { horizontalScale } from './styles'; function NavigationContainer() { @@ -108,7 +108,7 @@ function NavigationContainer() { /> - {showFab && } + {showFab && } ); } diff --git a/src/screens/welcome.tsx b/src/screens/welcome.tsx index 6c8de9a..f1d8ab4 100644 --- a/src/screens/welcome.tsx +++ b/src/screens/welcome.tsx @@ -11,7 +11,6 @@ const WelcomeScreen = (properties: { selectStorageLocation: () => void }) => { style={[styles.marginBottom, styles.centerText]}> Welcome to Terminally Online! - diff --git a/src/styles.tsx b/src/styles.tsx index bdfc3e6..06f9c54 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -17,11 +17,6 @@ const styles = StyleSheet.create({ padding: { padding: '5%', }, - spaceBetweenHorizontal: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - }, centered: { flex: 1, justifyContent: 'center',