Commit a9752fc2 authored by 7056117's avatar 7056117
Browse files

Merge branch 'master' of https://git.science.uu.nl/0517356/gl-proj

# Conflicts:
#	TraCloSo/scr/Information.js
parents 8a1cf016 7a63957c
......@@ -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>
......
<?php
$json = file_get_contents('php://input');
// decoding the received JSON and store into $obj variable.
$obj = json_decode($json,true);
// name store into $name.
$name = $obj['name'];
// same with $email.
$email = $obj['email'];
// same with $motivation.
$motivation = $obj['motivation'];
$to = $email;
$subject = "Request made" ;
$message = "Dear,\n\nThanks for your request for " . $name . "!\nWe will do research to the brand you requested to be researched. In case we want to contact you we will do that at " . $email . "
\nKind regards,\nThe TraCloSo team";
$headers = "From: info@tracloso.com" . "\r\n" . "BCC: thomas.hietkamp@gmail.com";
mail($to,$subject,$message,$headers);
?>
......@@ -7,12 +7,16 @@ import { SafeAreaView } from 'react-native-safe-area-context';
import Icon from "react-native-vector-icons/AntDesign";
//view for the About screen
export default function About() {
export default function About({navigation}) {
return (
<SafeAreaView style={style.container}>
<View style={style.AHeader}>
<Text style={style.AHeaderText}>Contact</Text>
<Text style={style.AHeaderText}>About</Text>
</View>
<TouchableOpacity style={style.BackButton} onPress={() => navigation.goBack()}>
<MaterialCommunityIcons style={style.Arrow} name="chevron-left" size={18}/>
<Text>back</Text>
</TouchableOpacity>
</SafeAreaView>
);
}
......@@ -39,5 +43,17 @@ const style = StyleSheet.create({
marginTop: 20,
}
})
}
},
BackButton: {
flexDirection: 'row',
marginLeft: 10,
marginTop: 10
},
Arrow: {
...Platform.select({
android: {
marginTop: 2,
}
})
},
})
\ No newline at end of file
......@@ -7,12 +7,16 @@ import { SafeAreaView } from 'react-native-safe-area-context';
import Icon from "react-native-vector-icons/AntDesign";
//view for the Contact screen
export default function Contact() {
export default function Contact( {navigation}) {
return (
<SafeAreaView style={style.container}>
<View style={style.CHeader}>
<Text style={style.CHeaderText}>Contact</Text>
</View>
<TouchableOpacity style={style.BackButton} onPress={() => navigation.goBack()}>
<MaterialCommunityIcons style={style.Arrow} name="chevron-left" size={18}/>
<Text>back</Text>
</TouchableOpacity>
</SafeAreaView>
);
}
......@@ -39,5 +43,17 @@ const style = StyleSheet.create({
marginTop: 20,
}
})
}
},
BackButton: {
flexDirection: 'row',
marginLeft: 10,
marginTop: 10
},
Arrow: {
...Platform.select({
android: {
marginTop: 2,
}
})
},
})
\ No newline at end of file
......@@ -5,6 +5,7 @@ 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";
<<<<<<< HEAD
import { createStackNavigator } from '@react-navigation/stack';
......@@ -12,6 +13,12 @@ import { createStackNavigator } from '@react-navigation/stack';
export default function Information() {
const navigation = useNavigation();
=======
import { Divider } from "react-native-elements";
//view for the information screen
export default function Information({navigation}) {
>>>>>>> 7a63957c9c41fe4d8a3a4d399dfb9409a16e4bb3
return (
<SafeAreaView style={style.container}>
<View style={style.IHeader}>
......@@ -28,6 +35,7 @@ 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>
<<<<<<< HEAD
<TouchableOpacity>
<Text style={[style.title, {paddingTop:15}]}>About
<Icon name='right' size={19} color='#767577'/>
......@@ -39,6 +47,17 @@ export default function Information() {
<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'/>
>>>>>>> 7a63957c9c41fe4d8a3a4d399dfb9409a16e4bb3
</TouchableOpacity>
</View>
</ScrollView>
......@@ -75,6 +94,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