-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kris Salvador
committed
Apr 2, 2018
0 parents
commit a524428
Showing
23 changed files
with
7,998 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": ["babel-preset-expo", "react-native-dotenv"], | ||
"env": { | ||
"development": { | ||
"plugins": ["transform-react-jsx-source"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[ignore] | ||
; We fork some components by platform | ||
.*/*[.]android.js | ||
|
||
; Ignore templates for 'react-native init' | ||
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.* | ||
|
||
; Ignore RN jest | ||
<PROJECT_ROOT>/node_modules/react-native/jest/.* | ||
|
||
; Ignore RNTester | ||
<PROJECT_ROOT>/node_modules/react-native/RNTester/.* | ||
|
||
; Ignore the website subdir | ||
<PROJECT_ROOT>/node_modules/react-native/website/.* | ||
|
||
; Ignore the Dangerfile | ||
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js | ||
|
||
; Ignore Fbemitter | ||
<PROJECT_ROOT>/node_modules/fbemitter/.* | ||
|
||
; Ignore "BUCK" generated dirs | ||
<PROJECT_ROOT>/node_modules/react-native/\.buckd/ | ||
|
||
; Ignore unexpected extra "@providesModule" | ||
.*/node_modules/.*/node_modules/fbjs/.* | ||
|
||
; Ignore polyfills | ||
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.* | ||
|
||
; Ignore various node_modules | ||
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.* | ||
<PROJECT_ROOT>/node_modules/expo/.* | ||
<PROJECT_ROOT>/node_modules/react-navigation/.* | ||
<PROJECT_ROOT>/node_modules/xdl/.* | ||
<PROJECT_ROOT>/node_modules/reqwest/.* | ||
<PROJECT_ROOT>/node_modules/metro-bundler/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow/ | ||
node_modules/expo/flow/ | ||
|
||
[options] | ||
emoji=true | ||
|
||
module.system=haste | ||
|
||
module.file_ext=.js | ||
module.file_ext=.jsx | ||
module.file_ext=.json | ||
module.file_ext=.ios.js | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FlowFixMeProps | ||
suppress_type=$FlowFixMeState | ||
suppress_type=$FixMe | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
|
||
unsafe.enable_getters_and_setters=true | ||
|
||
[version] | ||
^0.56.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# expo | ||
.expo/ | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# misc | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
registry=https://registry.npmjs.org/ | ||
email=krissalvador27@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React, { Component } from "react"; | ||
import { StackNavigator } from "react-navigation"; | ||
import HomeScreen from "./components/Home"; | ||
import CameraScreen from "./components/Camera"; | ||
import DetectorScreen from "./components/Detector"; | ||
import ResultsScreen from "./components/Results"; | ||
|
||
const mapNavigationParamsToProps = SomeComponent => { | ||
return class extends React.Component { | ||
render() { | ||
const { navigation, ...otherProps } = this.props; | ||
|
||
// Unpack navigation params to send as props | ||
const { state: { params } } = navigation; | ||
|
||
return <SomeComponent {...this.props} {...params} />; | ||
} | ||
}; | ||
}; | ||
|
||
export default StackNavigator( | ||
{ | ||
Home: { | ||
screen: HomeScreen | ||
}, | ||
Camera: { | ||
screen: CameraScreen | ||
}, | ||
Detector: { | ||
screen: mapNavigationParamsToProps(DetectorScreen) | ||
}, | ||
Results: { | ||
screen: mapNavigationParamsToProps(ResultsScreen) | ||
} | ||
}, | ||
{ | ||
headerMode: "none", | ||
navigationOptions: { | ||
headerVisible: false | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import App from './App'; | ||
|
||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders without crashing', () => { | ||
const rendered = renderer.create(<App />).toJSON(); | ||
expect(rendered).toBeTruthy(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Sammich | ||
|
||
Life changing mobile app that determines whether or not something is a sandwich | ||
|
||
## How to run | ||
|
||
This app was built with [Create React Native App (CRNA)](https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html) and requires an API key from [Clarifai](https://clarifai.com/developer/guide/) in order for the app to access their public [food model API](https://clarifai.com/models/food-image-recognition-model-bd367be194cf45149e75f01d59f77ba7) | ||
|
||
To run locally put your Clarifai API KEY in the `.env` file then do | ||
|
||
npm install | ||
npm start | ||
|
||
You can then download [Expo](https://expo.io/tools#client) on your android or iOS device, scan the QR code and view the app :) | ||
|
||
## Credits | ||
|
||
* Create React Native App | ||
* Clarifai | ||
* Kawaii Icons made by [FreePik](https://www.flaticon.com/authors/freepik) from [flaticon](www.flaticon.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"expo": { | ||
"sdkVersion": "25.0.0" | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.