Skip to content

Commit

Permalink
Added logo
Browse files Browse the repository at this point in the history
  • Loading branch information
shounakdatta committed Dec 23, 2020
1 parent 7273dbf commit 39525dd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
10 changes: 6 additions & 4 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import SignUp from './SignUp'
import Login from './Login'
import ImageUpload from './ImageUpload'

console.disableYellowBox = true

// create our app's navigation stack
export default createAppContainer(createSwitchNavigator(
{
ImageUpload,
Loading,
SignUp,
Login
ImageUpload,
Loading,
SignUp,
Login
},
{
initialRouteName: 'Loading',
Expand Down
16 changes: 10 additions & 6 deletions ImageUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@ export default class ImageUploadScreen extends Component {

componentDidMount() {
this.getLocation().then(
({ latitude, longitude }) => this.setState(
{ location: { latitude, longitude } }
)
(data) => {
this.setState({
location: {
latitude: data.coords.latitude,
longitude: data.coords.longitude
}
})
}
)
}

getLocation = async () => {
const { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status === 'granted') {
return Location.getCurrentPositionAsync({ enableHighAccuracy: true });
return await Location.getCurrentPositionAsync({ enableHighAccuracy: true });
} else {
throw new Error('Location permission not granted');
}
Expand Down Expand Up @@ -80,7 +85,6 @@ export default class ImageUploadScreen extends Component {
}
).then(res => res.json())
console.log(response);

}
)
}
Expand All @@ -95,7 +99,7 @@ export default class ImageUploadScreen extends Component {
download = () => {
const { name } = this.state
storage.ref('images').child(name).getDownloadURL().then(
uri => console.log(uri)
uri => this.setState({ image: uri })
)
}

Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# FoodSnap
Had an event? Have tons of leftovers? Don't know who to call, what to say, what to do? Easy!
<p align="center">
<img src='./assets/logo.png?raw=true' width='40%'>
</p>

---

Had an event? Have tons of leftovers? Don't know who to call, what to say, what to do? Easy!

FoodSnap is an integrated mobile app that uses image recognition and mobile location data to detect what food you have left over and where it can be picked up. What's even cooler is that all of the data is automatically compiled into a social media post for you, making food sharing so much simpler. All you have to do is take a picture and hit submit. Your post will be all over local food distribution channels :smile:
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 39525dd

Please sign in to comment.