diff --git a/mobile/src/components/Header/index.js b/mobile/src/components/Header/index.js
index 8933ea0..035790f 100644
--- a/mobile/src/components/Header/index.js
+++ b/mobile/src/components/Header/index.js
@@ -1,18 +1,17 @@
-import React, {useState} from 'react';
-import { View, Text, FlatList } from 'react-native';
+import React from 'react';
+import { Text } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
+import Icon from 'react-native-vector-icons/Feather';
import styles from './styles';
-const Header = props => {
-
- return (
-
- {props.title}
-
- );
-}
+const Header = ({ title, onPressBack }) => (
+
+ {onPressBack ? : null}
+ {title}
+
+);
-export default Header;
\ No newline at end of file
+export default Header;
diff --git a/mobile/src/components/Header/styles.js b/mobile/src/components/Header/styles.js
index c0e2437..67e19bc 100644
--- a/mobile/src/components/Header/styles.js
+++ b/mobile/src/components/Header/styles.js
@@ -1,24 +1,33 @@
import { StyleSheet } from 'react-native';
const styles = StyleSheet.create({
- top: {
- height: 250,
- width: 300,
- alignSelf: 'center',
- top: -100,
- borderBottomLeftRadius: 1000,
- borderBottomRightRadius: 1000,
- transform: [{scaleX: 2}]
- },
- pageTitle: {
- fontSize: 20,
- color: '#ffffff',
- lineHeight: 22,
- fontFamily: 'Fjalla-One',
- top: 175,
- alignSelf: 'center',
- transform: [{scaleX: 1/2}],
- },
+ top: {
+ height: 250,
+ width: 300,
+ alignSelf: 'center',
+ top: -100,
+ borderBottomLeftRadius: 1000,
+ borderBottomRightRadius: 1000,
+ transform: [{ scaleX: 2 }],
+ },
+ pageTitle: {
+ fontSize: 20,
+ color: '#ffffff',
+ lineHeight: 22,
+ fontFamily: 'Fjalla-One',
+ top: 175,
+ alignSelf: 'center',
+ transform: [{ scaleX: 1 / 2 }],
+ height: 30,
+ textAlignVertical: 'center',
+ },
+ back: {
+ position: 'absolute',
+ top: 172.5,
+ left: 70,
+ /* alignSelf: 'center', */
+ transform: [{ scaleX: 1 / 2 }],
+ },
});
-export default styles;
\ No newline at end of file
+export default styles;
diff --git a/mobile/src/components/notification/index.js b/mobile/src/components/notification/index.js
new file mode 100644
index 0000000..c9e8add
--- /dev/null
+++ b/mobile/src/components/notification/index.js
@@ -0,0 +1,32 @@
+import React from 'react';
+import { View, Text } from 'react-native';
+import Icon from 'react-native-vector-icons/EvilIcons';
+
+import styles from './styles';
+
+const Description = (type, name) => {
+ switch (type) {
+ case 'NOTIFICATION_MESSAGE':
+ return ({`${name} te enviou uma mensangem`});
+ case 'NOTIFICATION_PROJECT_ACCEPTED':
+ return ({`${name} te aceitou no projeto`});
+ case 'NOTIFICATION_PROJECT_REQUEST':
+ return ({`${name} pediu para fazer parte do seu projeto`});
+ case 'NOTIFICATION_PROJECT_INVITE':
+ return ({`${name} pediu para fazer parte deste projeto`});
+ default:
+ return null;
+ }
+};
+
+const Notification = ({ name, type }) => (
+
+
+ {name}
+ {Description(type, name)}
+
+
+
+);
+
+export default Notification;
diff --git a/mobile/src/components/notification/styles.js b/mobile/src/components/notification/styles.js
new file mode 100644
index 0000000..99982c8
--- /dev/null
+++ b/mobile/src/components/notification/styles.js
@@ -0,0 +1,32 @@
+import { StyleSheet } from 'react-native';
+
+const styles = StyleSheet.create({
+ card: {
+ backgroundColor: '#ffffff',
+ height: 85,
+ width: 300,
+ borderRadius: 8,
+ margin: 10,
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ flexDirection: 'row',
+ },
+ name: {
+ fontFamily: 'Fjalla-One',
+ fontSize: 14,
+ marginVertical: 5,
+ marginLeft: 65,
+ },
+ quit: {
+ padding: 30,
+ },
+ description: {
+ fontFamily: 'Fjalla-One',
+ fontSize: 12,
+ color: '#888888',
+ marginLeft: 65,
+ width: 150,
+ },
+});
+
+export default styles;
diff --git a/mobile/src/pages/Main/index.js b/mobile/src/pages/Main/index.js
index e7464ff..069e1d3 100644
--- a/mobile/src/pages/Main/index.js
+++ b/mobile/src/pages/Main/index.js
@@ -1,45 +1,45 @@
import React, { useState } from 'react';
import { View, Text, FlatList } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
-import { Button, Input } from 'react-native-elements';
-import Icon from 'react-native-vector-icons/Ionicons';
+import { Button } from 'react-native-elements';
import Project from '../../components/projectCard';
import Header from '../../components/Header';
import SearchBar from '../../components/searchBar';
import styles from './styles';
-function Main() {
+const Main = ({ navigation }) => {
+ const [searchText, changeSearchText] = useState('');
- var [searchText, changeSearchText] = useState('');
-
- var mock = [
+ let mock = [
{
projectName: 'Plataforma educacional gamificada',
ownerName: 'Jason Fried',
avatar: '../../../assets/icon.png',
- labels: ['Rails', 'Ruby on Rails']
+ labels: ['Rails', 'Ruby on Rails'],
},
{
projectName: 'App de academia gamificado',
ownerName: 'Henri Charriere',
avatar: '../../../assets/icon.png',
- labels: ['Javascript', 'React Native']
+ labels: ['Javascript', 'React Native'],
},
{
projectName: 'Chatbot de monitoramento ',
ownerName: 'Stephen King',
avatar: '../../../assets/icon.png',
- labels: ['Rasa', 'Python']
- }
+ labels: ['Rasa', 'Python'],
+ },
];
- mock = mock.filter(project => {return project.projectName.toLowerCase().includes(searchText.toLowerCase())});
+ mock = mock.filter((project) => project.projectName.toLowerCase()
+ .includes(searchText.toLowerCase()));
return (
-
-
+
@@ -48,15 +48,15 @@ function Main() {
index.toString()}
data={mock}
- renderItem={(project) => ()}
+ renderItem={(project) => ()}
style={styles.projectList}
showsVerticalScrollIndicator={false}
/>
-
-
+
+
);
-}
+};
export default Main;
diff --git a/mobile/src/pages/Main/styles.js b/mobile/src/pages/Main/styles.js
index dfb68cd..d0f7744 100644
--- a/mobile/src/pages/Main/styles.js
+++ b/mobile/src/pages/Main/styles.js
@@ -4,14 +4,14 @@ const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
- backgroundColor: '#F5F7FB'
+ backgroundColor: '#F5F7FB',
},
projectList: {
top: -100,
flex: 1,
},
projectHeight: {
- height: 325
+ height: 325,
},
button: {
height: 55,
@@ -19,12 +19,12 @@ const styles = StyleSheet.create({
backgroundColor: '#7AC14E',
borderRadius: 8,
zIndex: 4,
- shadowOffset: {width: 10, height: 10},
+ shadowOffset: { width: 10, height: 10 },
shadowColor: 'black',
- shadowOpacity: .8,
+ shadowOpacity: 0.8,
position: 'absolute',
bottom: 30,
- left: -150
+ left: -150,
},
bottomGradient: {
height: 400,
@@ -32,7 +32,7 @@ const styles = StyleSheet.create({
zIndex: 3,
width: 500,
marginTop: -320,
- bottom: 0
+ bottom: 0,
},
projectAvailable: {
top: -100,
@@ -42,11 +42,11 @@ const styles = StyleSheet.create({
fontSize: 13,
letterSpacing: 1,
lineHeight: 16,
- fontFamily: 'Fjalla-One'
+ fontFamily: 'Fjalla-One',
},
buttonText: {
- fontFamily: 'Fjalla-One'
- }
+ fontFamily: 'Fjalla-One',
+ },
});
export default styles;
diff --git a/mobile/src/pages/Notifications/index.js b/mobile/src/pages/Notifications/index.js
new file mode 100644
index 0000000..f669df2
--- /dev/null
+++ b/mobile/src/pages/Notifications/index.js
@@ -0,0 +1,50 @@
+import React, { useState } from 'react';
+import { View, FlatList, Text } from 'react-native';
+import Header from '../../components/Header';
+import Notification from '../../components/notification';
+
+import styles from './styles';
+
+const Notifications = () => {
+ const [notifications, updateNotifications] = useState([
+ {
+ name: 'Ateldy Brasil',
+ type: 'NOTIFICATION_PROJECT_ACCEPTED',
+ date: '10/04/2020',
+ project: 'Ada Bot',
+ },
+ {
+ name: 'João Vitor',
+ type: 'NOTIFICATION_MESSAGE',
+ date: '12/04/2020',
+ project: 'Hub Care',
+ },
+ {
+ name: 'Alan Marques',
+ type: 'NOTIFICATION_PROJECT_REQUEST',
+ date: '11/04/2020',
+ project: 'IFB',
+ },
+ ]);
+
+ return (
+
+
+ PROJETOS DISPONÍVEIS
+ index.toString()}
+ data={notifications}
+ renderItem={(notification) => (
+
+ )}
+ />
+
+ );
+};
+
+export default Notifications;
diff --git a/mobile/src/pages/Notifications/styles.js b/mobile/src/pages/Notifications/styles.js
new file mode 100644
index 0000000..f356514
--- /dev/null
+++ b/mobile/src/pages/Notifications/styles.js
@@ -0,0 +1,26 @@
+import { StyleSheet } from 'react-native';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ backgroundColor: '#F5F7FB',
+ },
+ list: {
+ flex: 1,
+ top: -75,
+ },
+ subtitle: {
+ top: -75,
+ alignSelf: 'flex-start',
+ left: 30,
+ color: 'rgba(56, 79, 125, .8)',
+ fontSize: 13,
+ letterSpacing: 1,
+ lineHeight: 16,
+ fontFamily: 'Fjalla-One',
+ marginBottom: 10,
+ },
+});
+
+export default styles;
diff --git a/mobile/src/pages/Projects/index.js b/mobile/src/pages/Projects/index.js
index 35f5b9b..df1e787 100644
--- a/mobile/src/pages/Projects/index.js
+++ b/mobile/src/pages/Projects/index.js
@@ -1,47 +1,47 @@
import React, { useState } from 'react';
import { View, Text, FlatList } from 'react-native';
+import { Button } from 'react-native-elements';
import Project from '../../components/projectCard';
import Header from '../../components/Header';
import SearchBar from '../../components/searchBar';
-import { Button } from 'react-native-elements';
-import Icon from 'react-native-vector-icons/Ionicons';
import styles from './styles';
-const Projects = () => {
-
- var [searchText, changeSearchText] = useState('');
+const Projects = ({ navigation }) => {
+ const [searchText, changeSearchText] = useState('');
- var mock = [
+ let mock = [
{
projectName: 'Plataforma educacional gamificada',
ownerName: 'Jason Fried',
avatar: '../../../assets/icon.png',
- labels: ['Rails', 'Ruby on Rails']
+ labels: ['Rails', 'Ruby on Rails'],
}];
- mock = mock.filter(project => {return project.projectName.toLowerCase().includes(searchText.toLowerCase())});
- return (
-
-
-
- MEUS PROJETOS
-
- index.toString()}
- data={mock}
- renderItem={(project) => ()}
- style={styles.projectList}
- showsVerticalScrollIndicator={false}
- />
-
-
-
- )
-}
+ mock = mock.filter((project) => project.projectName.toLowerCase()
+ .includes(searchText.toLowerCase()));
+ return (
+
+
+
+ MEUS PROJETOS
+
+ index.toString()}
+ data={mock}
+ renderItem={(project) => ()}
+ style={styles.projectList}
+ showsVerticalScrollIndicator={false}
+ />
+
+
+
+ );
+};
-export default Projects;
\ No newline at end of file
+export default Projects;
diff --git a/mobile/src/routes.js b/mobile/src/routes.js
index 0d9686e..810f56e 100644
--- a/mobile/src/routes.js
+++ b/mobile/src/routes.js
@@ -2,14 +2,15 @@ import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
-import Icon from 'react-native-vector-icons/Ionicons';
+import Icon from 'react-native-vector-icons/Ionicons';
import * as Font from 'expo-font';
+import { Text } from 'react-native';
import Main from './pages/Main';
import LoginPage from './pages/Main/LoginPage';
import Splash from './pages/Splash';
-import Projects from './pages/Projects'
+import Projects from './pages/Projects';
+import Notifications from './pages/Notifications';
-import {Text} from 'react-native';
const Stack = createStackNavigator();
@@ -17,9 +18,7 @@ const Tab = createMaterialBottomTabNavigator();
/* As telas deverão ser inseridas neste Navigator */
-const MainApp = () => {
-
- return (
+const MainApp = () => (
{
inactiveColor="rgba(200,200,200, .7)"
barStyle={{ backgroundColor: '#ffffff' }}
>
- ()
- }}
- />
+ (),
+ }}
+ />
- ()
- }}
- />
- Minhas notificações}
- options={{
- tabBarLabel: 'Notificações',
- tabBarIcon: ({color}) => (),
- }}
- />
- Meu perfil}
- options={{
- tabBarLabel: 'Perfil',
- tabBarIcon: ({color}) => ()
- }}
- />
+ (),
+ }}
+ />
+ (),
+ }}
+ />
+ Meu perfil}
+ options={{
+ tabBarLabel: 'Perfil',
+ tabBarIcon: ({ color }) => (),
+ }}
+ />
- )
-};
-
-
+);
class Routes extends React.Component {
-
- componentDidMount()
- {
- Font.loadAsync({'Fjalla-One': require('../assets/fonts/FjallaOne-Regular.ttf')});
+ componentDidMount() {
+ Font.loadAsync({ 'Fjalla-One': require('../assets/fonts/FjallaOne-Regular.ttf') });
}
- render()
- {
- return(
-
-
-
-
-
-
- )
+ render() {
+ return (
+
+
+
+
+
+
+ );
}
-};
+}
export default Routes;