-
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.
Created basic Sign Up, Home and Create screens. Basic functionality a…
…ccomplished.
- Loading branch information
0 parents
commit 0a951fd
Showing
63 changed files
with
13,360 additions
and
0 deletions.
There are no files selected for viewing
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,7 @@ | ||
node_modules/**/* | ||
.expo/* | ||
npm-debug.* | ||
*.jks | ||
*.p12 | ||
*.key | ||
*.mobileprovision |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,45 @@ | ||
import React, { Component } from 'react'; | ||
import { AppLoading } from 'expo'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { fontAssets } from './helpers'; | ||
import { Provider } from 'react-redux'; | ||
|
||
import Root from './src/Root'; | ||
|
||
export default class App extends Component { | ||
state = { | ||
fontLoaded: false | ||
}; | ||
|
||
componentWillMount() { | ||
this._loadAssetAsync(); | ||
} | ||
|
||
async _loadAssetAsync() { | ||
await Promise.all(fontAssets); | ||
|
||
this.setState({ | ||
fontLoaded: true | ||
}); | ||
} | ||
|
||
render() { | ||
if (!this.state.fontLoaded) { | ||
return <AppLoading />; | ||
} | ||
return ( | ||
<View style={{ flex: 1 }}> | ||
<Root /> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center' | ||
} | ||
}); |
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,24 @@ | ||
{ | ||
"expo": { | ||
"name": "hotspot-mobile", | ||
"slug": "hotspot", | ||
"privacy": "public", | ||
"sdkVersion": "32.0.0", | ||
"platforms": ["ios", "android"], | ||
"version": "1.0.0", | ||
"orientation": "portrait", | ||
"icon": "./assets/icon.png", | ||
"splash": { | ||
"image": "./assets/splash.png", | ||
"resizeMode": "contain", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"updates": { | ||
"fallbackToCacheTimeout": 0 | ||
}, | ||
"assetBundlePatterns": ["**/*"], | ||
"ios": { | ||
"supportsTablet": true | ||
} | ||
} | ||
} |
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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,6 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
}; | ||
}; |
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,36 @@ | ||
import { Font } from 'expo'; | ||
|
||
const cachedFonts = fonts => fonts.map(font => Font.loadAsync(font)); | ||
|
||
export const fontAssets = cachedFonts([ | ||
{ | ||
montserrat: require('../assets/fonts/Montserrat-Regular.ttf') | ||
}, | ||
{ | ||
montserratItalic: require('../assets/fonts/Montserrat-MediumItalic.ttf') | ||
}, | ||
{ | ||
montserratBold: require('../assets/fonts/Montserrat-Bold.ttf') | ||
}, | ||
{ | ||
montserratSemiBold: require('../assets/fonts/Montserrat-SemiBold.ttf') | ||
}, | ||
{ | ||
montserratLight: require('../assets/fonts/Montserrat-Light.ttf') | ||
}, | ||
{ | ||
montserratLightItalic: require('../assets/fonts/Montserrat-LightItalic.ttf') | ||
}, | ||
{ | ||
montserratExtraLight: require('../assets/fonts/Montserrat-ExtraLight.ttf') | ||
}, | ||
{ | ||
montserratExtraLightItalic: require('../assets/fonts/Montserrat-ExtraLightItalic.ttf') | ||
}, | ||
{ | ||
montserratThin: require('../assets/fonts/Montserrat-Thin.ttf') | ||
}, | ||
{ | ||
montserratThinItalic: require('../assets/fonts/Montserrat-ThinItalic.ttf') | ||
} | ||
]); |
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 @@ | ||
export * from './cachedFonts'; |
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,58 @@ | ||
const validateInput = (input, requiredLength) => { | ||
let error = ''; | ||
|
||
if (input && input.length < requiredLength) { | ||
error = 'Needs to be longer'; | ||
} | ||
return error; | ||
}; | ||
|
||
const validateEmail = email => { | ||
let error = ''; | ||
|
||
if (email) { | ||
if (email.split('').filter(x => x === '@').length !== 1) { | ||
error = 'Email missing @ symbol'; | ||
} else if (email.indexOf('.') === -1) { | ||
error = 'Email should contain at least one dot (e.g. .com)'; | ||
} else if (email.length < 5) { | ||
error = 'Email should be at least 6 characters long'; | ||
} | ||
} | ||
return error; | ||
}; | ||
|
||
const validateFullName = name => { | ||
let errors = []; | ||
|
||
if (!name.includes(' ')) { | ||
errors.push('You must provide both your given and your family name'); | ||
} | ||
const words = name.split(' '); | ||
let flag = 0; | ||
words.forEach(word => { | ||
if (word.length < 3) { | ||
flag++; | ||
} | ||
}); | ||
|
||
if (flag !== 0) { | ||
errors.push('Name must be at least 3 characters long'); | ||
} | ||
|
||
return errors; | ||
}; | ||
|
||
const isButtonDisabled = state => { | ||
const { title, description, date } = state; | ||
let disabled; | ||
if (title && description) { | ||
disabled = false; | ||
} else { | ||
disabled = true; | ||
} | ||
|
||
return disabled; | ||
}; | ||
|
||
export { validateInput, validateEmail, validateFullName, isButtonDisabled }; |
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,41 @@ | ||
{ | ||
"main": "node_modules/expo/AppEntry.js", | ||
"scripts": { | ||
"start": "expo start", | ||
"android": "expo start --android", | ||
"ios": "expo start --ios", | ||
"eject": "expo eject", | ||
"clean-modules": "rimraf node_modules" | ||
}, | ||
"dependencies": { | ||
"@expo/vector-icons": "^9.0.0", | ||
"axios": "^0.18.0", | ||
"expo": "^32.0.0", | ||
"moment": "^2.23.0", | ||
"native-base": "^2.10.0", | ||
"prop-types": "^15.6.2", | ||
"react": "16.5.0", | ||
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz", | ||
"react-native-design-utility": "^0.0.30", | ||
"react-native-elements": "^0.19.1", | ||
"react-native-maps": "^0.23.0", | ||
"react-native-modal-datetime-picker": "^6.0.0", | ||
"react-navigation": "^3.0.9", | ||
"react-navigation-tabs": "^1.0.2", | ||
"react-redux": "^6.0.0", | ||
"redux": "^4.0.1", | ||
"redux-form": "^8.1.0", | ||
"redux-logger": "^3.0.6", | ||
"redux-promise-middleware": "^5.1.1", | ||
"redux-saga": "^0.16.2", | ||
"redux-thunk": "^2.3.0", | ||
"rimraf": "^2.6.3", | ||
"styled-components": "^4.1.3" | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-styled-components": "^1.10.0", | ||
"babel-preset-expo": "^5.0.0", | ||
"react-native-debugger-open": "^0.3.17" | ||
}, | ||
"private": true | ||
} |
Oops, something went wrong.