Skip to content

Commit afad8d3

Browse files
author
Jean Rauwers
committed
Add - episode 0 setup
1 parent 4dd2ad5 commit afad8d3

14 files changed

+13368
-0
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/**/*
2+
.expo/*
3+
.expo-shared
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store

episode-0-settup/mobile-app/App.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
import { StatusBar } from 'expo-status-bar';
3+
import { StyleSheet, Text, View } from 'react-native';
4+
5+
import { NavigationContainer } from '@react-navigation/native';
6+
import { createStackNavigator } from '@react-navigation/stack';
7+
8+
import Login from './pages/Login';
9+
import Register from './pages/Register';
10+
11+
export default function App() {
12+
const Stack = createStackNavigator()
13+
14+
return (
15+
<NavigationContainer>
16+
<Stack.Navigator screenOptions={{
17+
headerShown: false
18+
}}>
19+
<Stack.Screen name="Login" component={Login} />
20+
<Stack.Screen name="Register" component={Register} />
21+
</Stack.Navigator>
22+
</NavigationContainer>
23+
);
24+
}
25+
26+
const styles = StyleSheet.create({
27+
container: {
28+
flex: 1,
29+
backgroundColor: '#fff',
30+
alignItems: 'center',
31+
justifyContent: 'center',
32+
},
33+
btnContainer: {
34+
position: 'absolute',
35+
bottom: 50
36+
},
37+
text: {
38+
color: 'black'
39+
}
40+
});

episode-0-settup/mobile-app/app.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"expo": {
3+
"name": "mobile-app",
4+
"slug": "mobile-app",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"splash": {
9+
"image": "./assets/splash.png",
10+
"resizeMode": "contain",
11+
"backgroundColor": "#ffffff"
12+
},
13+
"updates": {
14+
"fallbackToCacheTimeout": 0
15+
},
16+
"assetBundlePatterns": [
17+
"**/*"
18+
],
19+
"ios": {
20+
"supportsTablet": true
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#FFFFFF"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/favicon.png"
30+
}
31+
}
32+
}
Loading
Loading
1.43 KB
Loading
21.9 KB
Loading
47.3 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"main": "node_modules/expo/AppEntry.js",
3+
"scripts": {
4+
"start": "expo start",
5+
"android": "expo start --android",
6+
"ios": "expo start --ios",
7+
"web": "expo start --web",
8+
"eject": "expo eject"
9+
},
10+
"dependencies": {
11+
"@react-native-community/masked-view": "0.1.10",
12+
"@react-navigation/native": "^5.9.2",
13+
"@react-navigation/stack": "^5.14.2",
14+
"expo": "~40.0.0",
15+
"expo-status-bar": "~1.0.3",
16+
"react": "16.13.1",
17+
"react-dom": "16.13.1",
18+
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
19+
"react-native-gesture-handler": "~1.8.0",
20+
"react-native-reanimated": "~1.13.0",
21+
"react-native-safe-area-context": "3.1.9",
22+
"react-native-screens": "~2.15.2",
23+
"react-native-web": "~0.13.12"
24+
},
25+
"devDependencies": {
26+
"@babel/core": "~7.9.0"
27+
},
28+
"private": true
29+
}
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import React from 'react'
2+
import { View, Text, TouchableOpacity, StyleSheet, ImageBackground } from 'react-native'
3+
import { color } from 'react-native-reanimated'
4+
5+
const bgImage = require('../assets/background.jpg')
6+
7+
const Login = ({ navigation }) => {
8+
return (
9+
<View style={styles.container}>
10+
<ImageBackground source={bgImage} style={styles.image}>
11+
<Text style={styles.title}>Sport's App</Text>
12+
<TouchableOpacity onPress={() => navigation.navigate('Register')}>
13+
<Text>Go to Routes PAGE</Text>
14+
</TouchableOpacity>
15+
</ImageBackground>
16+
</View>
17+
)
18+
}
19+
20+
const styles = StyleSheet.create({
21+
container: {
22+
flex: 1,
23+
justifyContent: "center",
24+
alignItems: 'center'
25+
},
26+
image: {
27+
flex: 1,
28+
width: "100%",
29+
height: "100%",
30+
justifyContent: "center",
31+
alignItems: 'center'
32+
},
33+
title: {
34+
fontSize: 32,
35+
marginBottom: 8,
36+
fontWeight: "bold",
37+
color: "#f04a5b"
38+
}
39+
40+
41+
})
42+
43+
44+
export default Login
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react'
2+
import { View, Text } from 'react-native'
3+
4+
const Register = () => {
5+
return (
6+
<View>
7+
<Text>Register PAGE</Text>
8+
</View>
9+
)
10+
}
11+
12+
export default Register;

0 commit comments

Comments
 (0)