-
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.
Merge pull request #6 from DiegoOTdC/styling
Styling
- Loading branch information
Showing
12 changed files
with
421 additions
and
145 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
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,19 +1,21 @@ | ||
import React from "react"; | ||
import { Text, View, ActivityIndicator } from "react-native"; | ||
import { green, blue } from "../../colours"; | ||
import { View, Image } from "react-native"; | ||
import { green } from "../../colours"; | ||
|
||
export default function Loading() { | ||
return ( | ||
<View | ||
style={{ | ||
flex: 1, | ||
justifyContent: "center", | ||
alignItems: "center", | ||
backgroundColor: green, | ||
}} | ||
> | ||
<Text style={{ color: blue }}>Niles: </Text> | ||
<Text style={{ color: blue }}>"Going as fast as I can.."</Text> | ||
<ActivityIndicator size="large" color={blue} /> | ||
<Image | ||
style={{ width: 400, height: 400 }} | ||
source={require("../../images/scanFoodLoading.gif")} | ||
/> | ||
</View> | ||
); | ||
} |
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.
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,35 @@ | ||
import React from "react"; | ||
|
||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import HomeScreen from "../screens/HomeScreen"; | ||
import BarcodeScanner from "../screens/BarcodeScanner"; | ||
import CameraScreen from "../screens/Camera"; | ||
import Preview from "../screens/Preview"; | ||
import Recipes from "../screens/Recipes"; | ||
import RecipeDetails from "../screens/RecipeDetails"; | ||
import Register from "../screens/Register"; | ||
import Login from "../screens/Login"; | ||
|
||
import { useSelector } from "react-redux"; | ||
import { selectToken } from "../store/user/selectors"; | ||
|
||
export default function StackNavigator() { | ||
const Stack = createStackNavigator(); | ||
const token = useSelector(selectToken); | ||
|
||
return ( | ||
<NavigationContainer> | ||
<Stack.Navigator screenOptions={{ headerShown: false }}> | ||
<Stack.Screen name="HomeScreen" component={HomeScreen} /> | ||
{!token ? <Stack.Screen name="Login" component={Login} /> : null} | ||
{!token ? <Stack.Screen name="Register" component={Register} /> : null} | ||
<Stack.Screen name="BarcodeScanner" component={BarcodeScanner} /> | ||
<Stack.Screen name="Camera" component={CameraScreen} /> | ||
<Stack.Screen name="Preview" component={Preview} /> | ||
<Stack.Screen name="Recipes" component={Recipes} /> | ||
<Stack.Screen name="RecipeDetails" component={RecipeDetails} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} |
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
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
Oops, something went wrong.