Skip to content

Commit

Permalink
Created basic Sign Up, Home and Create screens. Basic functionality a…
Browse files Browse the repository at this point in the history
…ccomplished.
  • Loading branch information
efthimispegas committed Feb 3, 2019
0 parents commit 0a951fd
Show file tree
Hide file tree
Showing 63 changed files with 13,360 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/**/*
.expo/*
npm-debug.*
*.jks
*.p12
*.key
*.mobileprovision
9 changes: 9 additions & 0 deletions .idea/hotspot.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

139 changes: 139 additions & 0 deletions .idea/workspace.xml

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

1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
45 changes: 45 additions & 0 deletions App.js
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'
}
});
24 changes: 24 additions & 0 deletions app.json
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
}
}
}
Binary file added assets/add-account-circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/flames/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/flames/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/flames/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/flames/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/flames/flame-custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fonts/Montserrat-Black.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-BlackItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Bold.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-BoldItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-ExtraBold.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-ExtraBoldItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-ExtraLight.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-ExtraLightItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Italic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Light.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-LightItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-MediumItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Regular.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-SemiBold.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-SemiBoldItalic.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-Thin.ttf
Binary file not shown.
Binary file added assets/fonts/Montserrat-ThinItalic.ttf
Binary file not shown.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/welcome_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions babel.config.js
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'],
};
};
36 changes: 36 additions & 0 deletions helpers/cachedFonts.js
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')
}
]);
1 change: 1 addition & 0 deletions helpers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './cachedFonts';
58 changes: 58 additions & 0 deletions helpers/validations.js
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 };
41 changes: 41 additions & 0 deletions package.json
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
}
Loading

0 comments on commit 0a951fd

Please sign in to comment.