Commit abbaf95e authored by Thomas's avatar Thomas
Browse files

navigation and email after form

parent ca5791b2
......@@ -4,6 +4,8 @@ import MyTabs from './components/NavigationBar';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { StatusBar } from 'react-native';
import Brand from './scr/Brand';
import Contact from './scr/Contact'
import About from './scr/About'
import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
......@@ -20,6 +22,8 @@ export default function App() {
<Stack.Navigator headerMode="none" initialRouteName="Home">
<Stack.Screen name="Home" component={MyTabs} />
<Stack.Screen name="Brand" component={Brand} />
<Stack.Screen name="Contact" component={Contact} />
<Stack.Screen name="About" component={About} />
</Stack.Navigator>
</NavigationContainer>
......
......@@ -5,9 +5,10 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import { SafeAreaView } from 'react-native-safe-area-context';
import Icon from "react-native-vector-icons/AntDesign";
import { Divider } from "react-native-elements";
//view for the information screen
export default function Information() {
export default function Information({navigation}) {
return (
<SafeAreaView style={style.container}>
<View style={style.IHeader}>
......@@ -24,15 +25,15 @@ export default function Information() {
<Text>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in oluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</Text>
<TouchableOpacity>
<Text style={[style.title, {paddingTop:15}]}>About
<Icon name='right' size={19} color='#767577'/>
</Text>
</TouchableOpacity>
<TouchableOpacity>
<Text style={[style.title, {paddingTop:15}]}>Contact
<Icon name='right' size={19} color='#767577'/>
</Text>
<Divider style={{marginTop: 5}}/>
<TouchableOpacity style={style.Click} onPress={() => navigation.navigate('About')}>
<Text style={[style.title, {paddingTop:5}]}>About</Text>
<Icon name='right' size={18} style={{paddingTop: '2%'}} color='#767577'/>
</TouchableOpacity>
<Divider style={{marginTop: 5}}/>
<TouchableOpacity style={style.Click} onPress={() => navigation.navigate('Contact')}>
<Text style={[style.title, {paddingTop:5}]}>Contact</Text>
<Icon name='right' size={18} style={{paddingTop: '4%'}} color='#767577'/>
</TouchableOpacity>
</View>
</ScrollView>
......@@ -69,6 +70,10 @@ const style = StyleSheet.create({
marginRight: 15
},
title: {
fontSize: 19,
fontSize: 18,
},
Click: {
flexDirection: 'row',
justifyContent: 'space-between'
}
})
\ No newline at end of file
......@@ -35,15 +35,27 @@ export default function RequestForm() {
alert('Please enter your motivation');
return;
}
//Checked Successfully
Alert.alert(
"Your request has been received!",
"We'll send you a conformation email and we keep you updated through the mail. You can also find more information on our social media!",
);
//Checked Successfully
fetch('https://webspace.science.uu.nl/~8571333/tracloso/form.php', {
method: 'Post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: Name,
email: Mail,
motivation: Motivation
})
})
Alert.alert("Your request has been received!",
`We send you a conformation email and we keep you updated through the mail. You can also find more information on our social media!`)
onChangeName('');
onChangeMail('');
onChangeMotivation('');
};
};
var ButtonColor;
if (Name == '') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment