Skip to content

Commit

Permalink
start consumer scan
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelyoti committed May 13, 2018
1 parent 9fcc0c6 commit b9cc31e
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 16 deletions.
8 changes: 6 additions & 2 deletions App.js
Expand Up @@ -13,21 +13,25 @@ import Step4 from './screens/regisitration/Step4'
import Step5 from './screens/regisitration/Step5'
import Step6 from './screens/regisitration/Step6'


import ConsumerScan from './screens/consumer/Scan'

import {
createStackNavigator,
} from 'react-navigation'



const App = createStackNavigator({
// Home: { screen: HomeScreen },
Home: { screen: HomeScreen },
Reg1 : { screen : Step1 },
Reg2 : { screen : Step2 },
Reg3 : { screen : Step3 },
Reg4 : { screen : Step4 },
Reg5 : { screen : Step5 },
Reg6 : { screen : Step6 },
Display : { screen : Display }
Display : { screen : Display },
ConsumerScan : { screen : ConsumerScan }
});

export default App;
25 changes: 18 additions & 7 deletions components/NavBar.js
@@ -1,34 +1,45 @@
import React from "react";
import { Text, View, StyleSheet } from "react-native";
import NavigationBar from "react-native-navbar";
import { Button } from "react-native-elements";

export default class NavBar extends React.Component {
render() {
return (
<View style={styles.navbar}>
<Text style={styles.text}> BlockTree </Text>
<Text style={styles.text}> Localtrail </Text>
</View>
);
}
}

const styles = StyleSheet.create({
navbar: {
navbar : {
height: 46,
width: 375,
backgroundColor: "#1dc890",
position: "absolute",
top: 0,
flex: 1,
alignSelf: "stretch",
right: 0,
left: 0
},
text : {
color: 'white',
color : 'white',
fontSize : 30,
fontWeight : 'bold',
marginTop : 7
marginTop : 7,
},
text2 : {
color : 'white',
fontSize : 30,
fontWeight : 'bold',
marginTop : 7,
width : 100,
textAlign : 'right',
position: "absolute",
top: 0,
flex: 1,
right: 0,
marginRight : 15
}
});

Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -23,6 +23,7 @@
"react": "16.3.1",
"react-native": "~0.55.2",
"react-native-elements": "^0.19.1",
"react-native-fontawesome": "^5.7.0",
"react-native-navbar": "^2.1.0",
"react-native-sound": "^0.10.9",
"react-navigation": "^2.0.1"
Expand Down
8 changes: 7 additions & 1 deletion screens/HomeScreen.js
Expand Up @@ -14,7 +14,13 @@ export default class HomeScreen extends React.Component {
<Text>Home </Text>
<Button
onPress={() => navigate('Reg1')}
title="Get Started"
title="Add Goods"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
<Button
onPress={() => navigate('ConsumerScan')}
title="Scan Goods"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
Expand Down
24 changes: 24 additions & 0 deletions screens/consumer/Scan.js
@@ -0,0 +1,24 @@
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import NavBar from './../../components/NavBar'


export default class Display extends React.Component {
render() {
return (
<View style={styles.container}>
<NavBar/>
<Text>Scan </Text>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
12 changes: 6 additions & 6 deletions screens/regisitration/Step6.js
Expand Up @@ -38,13 +38,13 @@ export default class Step5 extends React.Component {
<Text style={styles.stepText}>Done</Text>
<Text style={styles.heading}>Done</Text>
<View style={styles.container}>




</View>


<Button
onPress={() => navigate('ConsumerScan')}
title="Scan Goods"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
</View>
);
}
Expand Down

0 comments on commit b9cc31e

Please sign in to comment.