-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
“T3sultan”
committed
Apr 17, 2022
1 parent
d45dc00
commit b7079e9
Showing
19 changed files
with
169 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { StyleSheet, Text, View, Image } from "react-native"; | ||
import React from "react"; | ||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | ||
// import Home from "../screens/app"; | ||
import Camera from "../screens/app/Camera"; | ||
import Search from "../screens/app/Search"; | ||
import Favourite from "../screens/app/Favourite"; | ||
import { Images } from "../theme"; | ||
import Box from "../screens/app/Box"; | ||
import Home from "../screens/app/Home"; | ||
|
||
const Tab = createBottomTabNavigator(); | ||
|
||
const AppNavigation = () => { | ||
return ( | ||
<Tab.Navigator | ||
screenOptions={({ route }) => ({ | ||
tabBarIcon: ({ focused }) => { | ||
let iconName; | ||
if (route.name === "Home") { | ||
iconName = focused ? Images.homeActive : Images.homeInActive; | ||
} else if (route.name === "Box") { | ||
iconName = focused ? Images.BoxInActive : Images.BoxActive; | ||
} else if (route.name === "Camera") { | ||
iconName = focused ? Images.CameraActive : Images.CameraInActive; | ||
} else if (route.name === "Favourite") { | ||
iconName = focused | ||
? Images.favouriteActive | ||
: Images.favouriteInActive; | ||
} else if (route.name === "Search") { | ||
iconName = Images.search; | ||
} | ||
|
||
return ( | ||
<Image | ||
style={{ width: 24, height: 24 }} | ||
resizeMode="contain" | ||
source={iconName} | ||
/> | ||
); | ||
}, | ||
tabBarLabel: () => null, | ||
})} | ||
> | ||
<Tab.Screen | ||
name="Home" | ||
component={Home} | ||
options={{ headerShown: false }} | ||
/> | ||
<Tab.Screen name="Box" component={Box} options={{ headerShown: false }} /> | ||
<Tab.Screen | ||
name="Camera" | ||
component={Camera} | ||
options={{ headerShown: false }} | ||
/> | ||
<Tab.Screen | ||
name="Search" | ||
component={Search} | ||
options={{ headerShown: false }} | ||
/> | ||
<Tab.Screen | ||
name="Favourite" | ||
component={Favourite} | ||
options={{ headerShown: false }} | ||
/> | ||
</Tab.Navigator> | ||
); | ||
}; | ||
|
||
export default AppNavigation; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import React from "react"; | ||
|
||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
const MainNavigation = () => { | ||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator> | ||
<Stack.Screen name="Home" component={AppNavigation} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
}; | ||
|
||
export default MainNavigation; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import React from "react"; | ||
|
||
const Box = () => { | ||
return ( | ||
<View> | ||
<Text>Box</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Box; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import React from "react"; | ||
|
||
const Camera = () => { | ||
return ( | ||
<View> | ||
<Text>Camera</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Camera; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import React from "react"; | ||
|
||
const Favourite = () => { | ||
return ( | ||
<View> | ||
<Text>Favourite</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Favourite; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import React from "react"; | ||
|
||
const Search = () => { | ||
return ( | ||
<View> | ||
<Text>Search</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
export default Search; | ||
|
||
const styles = StyleSheet.create({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import Home from "./Home"; | ||
import PlantDetails from "./PlantDetails"; | ||
// import Home from "./Home"; | ||
// import PlantDetails from "./PlantDetails"; | ||
|
||
export { Home, PlantDetails }; | ||
// export { Home, PlantDetails }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters