diff --git a/.buckconfig b/.buckconfig
index 934256c..840da5f 100644
--- a/.buckconfig
+++ b/.buckconfig
@@ -1,6 +1,5 @@
-
[android]
- target = Google Inc.:Google APIs:23
+ target = Google Inc.:Google APIs:23
[maven_repositories]
- central = https://repo1.maven.org/maven2
+ central = https://repo1.maven.org/maven2
diff --git a/src/actions/menuActions.js b/src/actions/menuActions.js
index 610d1d6..f50de9d 100644
--- a/src/actions/menuActions.js
+++ b/src/actions/menuActions.js
@@ -1,25 +1,25 @@
import * as types from './actionTypes';
export function menuopen() {
- return {
- type: types.MENUOPEN
- };
+ return {
+ type: types.MENUOPEN
+ };
}
export function menuclose() {
- return {
- type: types.MENUCLOSE
- };
+ return {
+ type: types.MENUCLOSE
+ };
}
export function main() {
- return {
- type: types.MAIN
- };
+ return {
+ type: types.MAIN
+ };
}
export function help() {
- return {
- type: types.HELP
- };
+ return {
+ type: types.HELP
+ };
}
diff --git a/src/components/help.js b/src/components/help.js
index 85f67ba..7c59acf 100644
--- a/src/components/help.js
+++ b/src/components/help.js
@@ -5,20 +5,20 @@ const styles = StyleSheet.create({
});
export default class Help extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
- render() {
- //const { counter } = this.props;
+ render() {
+ //const { counter } = this.props;
- return (
-
- This is a sample counter app.
- Press Increase to add 1 to the value.
- Press Decrease to subtract 1 from the value.
-
- );
- }
+ return (
+
+ This is a sample counter app.
+ Press Increase to add 1 to the value.
+ Press Decrease to subtract 1 from the value.
+
+ );
+ }
}
diff --git a/src/components/menu.js b/src/components/menu.js
index 030e4e6..89c8fcd 100644
--- a/src/components/menu.js
+++ b/src/components/menu.js
@@ -11,19 +11,19 @@ const styles = StyleSheet.create({
});
export default class Menu extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
- render() {
- const { main, help } = this.props;
+ render() {
+ const { main, help } = this.props;
- return (
-
- Calculator
- Help
- Link 4
-
- );
- }
+ return (
+
+ Calculator
+ Help
+ Link 4
+
+ );
+ }
}
diff --git a/src/components/resistor.js b/src/components/resistor.js
index b13a2aa..0d2a1dd 100644
--- a/src/components/resistor.js
+++ b/src/components/resistor.js
@@ -78,7 +78,8 @@ class Resistor extends Component {
- {
+ {
console.log(this);
Alert.alert(
'Clear resistor value?',
@@ -93,7 +94,8 @@ class Resistor extends Component {
{text: 'OK', onPress: clear},
]
)
- }} style={styles.clearbutton} activeOpacity={1}
+ }}
+ style={styles.clearbutton} activeOpacity={1}
>
Clear
@@ -118,7 +120,7 @@ function mapStateToProps(state, ownProps) {
}
export default connect(mapStateToProps,
- (dispatch) => ({
- actions: bindActionCreators(calcActions, dispatch)
- })
+ (dispatch) => ({
+ actions: bindActionCreators(calcActions, dispatch)
+ })
)(Resistor);
diff --git a/src/containers/app.js b/src/containers/app.js
index 5e68058..2a34ad4 100644
--- a/src/containers/app.js
+++ b/src/containers/app.js
@@ -14,11 +14,11 @@ const reducer = combineReducers(reducers);
const store = createStoreWithMiddleware(reducer);
export default class App extends Component {
- render() {
- return (
-
-
-
- );
- }
+ render() {
+ return (
+
+
+
+ );
+ }
}
diff --git a/src/containers/helpApp.js b/src/containers/helpApp.js
index 83454be..ff7dd0b 100644
--- a/src/containers/helpApp.js
+++ b/src/containers/helpApp.js
@@ -6,22 +6,18 @@ import Help from '../components/help';
import { connect } from 'react-redux';
class HelpApp extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
- render() {
- const { state, actions } = this.props;
- return (
-
- );
- }
+ render() {
+ const { state, actions } = this.props;
+ return (
+
+ );
+ }
}
export default connect(state => ({
- }),
- (dispatch) => ({
- })
-)(HelpApp);
-
+ }), (dispatch) => ({
+}))(HelpApp);
diff --git a/src/containers/menuApp.js b/src/containers/menuApp.js
index dc14ecb..27647a2 100644
--- a/src/containers/menuApp.js
+++ b/src/containers/menuApp.js
@@ -7,24 +7,22 @@ import * as menuActions from '../actions/menuActions';
import { connect } from 'react-redux';
class MenuApp extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
- render() {
- const { state, actions } = this.props;
- return (
-
- );
- }
+ render() {
+ const { state, actions } = this.props;
+ return (
+
+ );
+ }
}
export default connect(state => ({
- state: state
- }),
- (dispatch) => ({
- actions: bindActionCreators(menuActions, dispatch)
- })
-)(MenuApp);
+ state: state
+}), (dispatch) => ({
+ actions: bindActionCreators(menuActions, dispatch)
+}))(MenuApp);
diff --git a/src/containers/nav.js b/src/containers/nav.js
index cc8c239..2080f03 100644
--- a/src/containers/nav.js
+++ b/src/containers/nav.js
@@ -10,61 +10,57 @@ import * as menuActions from '../actions/menuActions';
import MenuApp from '../containers/menuApp';
class Nav extends Component {
- constructor(props) {
- super(props);
- }
+ constructor(props) {
+ super(props);
+ }
- render() {
- const { state, actions } = this.props;
+ render() {
+ const { state, actions } = this.props;
- const drawerStyles = {
- drawer: { shadowColor: '#000000', shadowOpacity: 0.8, shadowRadius: 3},
- main: {paddingLeft: 3},
- }
- const styles = StyleSheet.create({
- toolbar: {
- backgroundColor: '#e9eaed',
- height: 56,
- },
- });
+ const drawerStyles = {
+ drawer: { shadowColor: '#000000', shadowOpacity: 0.8, shadowRadius: 3},
+ main: {paddingLeft: 3},
+ }
+ const styles = StyleSheet.create({
+ toolbar: {
+ backgroundColor: '#e9eaed',
+ height: 56,
+ },
+ });
- return (
- }
- tapToClose={true}
- openDrawerOffset={0.3}
- captureGestures={false}
- panCloseMask={0.3}
- closedDrawerOffset={-3}
- styles={drawerStyles}
- tweenHandler={(ratio) => ({
- main: { opacity: 1, },
- mainOverlay: { opacity: ratio/2, backgroundColor: 'black', },
- })}
- >
-
-
- {state.page}
-
-
- );
- }
+ return (
+ }
+ tapToClose={true}
+ openDrawerOffset={0.3}
+ captureGestures={false}
+ panCloseMask={0.3}
+ closedDrawerOffset={-3}
+ styles={drawerStyles}
+ tweenHandler={(ratio) => ({
+ main: { opacity: 1, },
+ mainOverlay: { opacity: ratio/2, backgroundColor: 'black', },
+ })}
+ >
+
+
+ {state.page}
+
+
+ );
+ }
}
export default connect(state => ({
- state: state.menu
- }),
- (dispatch) => ({
- actions: bindActionCreators(menuActions, dispatch)
- })
-)(Nav);
-
-
+ state: state.menu
+}), (dispatch) => ({
+ actions: bindActionCreators(menuActions, dispatch)
+}))(Nav);
diff --git a/src/reducers/index.js b/src/reducers/index.js
index de9646e..71b35b4 100644
--- a/src/reducers/index.js
+++ b/src/reducers/index.js
@@ -2,6 +2,6 @@ import calc from './calc';
import menu from './menu';
export {
- calc,
- menu,
+ calc,
+ menu,
};
diff --git a/src/reducers/menu.js b/src/reducers/menu.js
index a9c8c8c..cddd230 100644
--- a/src/reducers/menu.js
+++ b/src/reducers/menu.js
@@ -12,32 +12,32 @@ const initialState = {
};
export default function menu(state = initialState, action = {}) {
- switch (action.type) {
- case types.MENUOPEN:
- return {
- ...state,
- isOpen: true,
- };
- case types.MENUCLOSE:
- return {
- ...state,
- isOpen: false,
- };
- case types.MAIN:
- return {
- ...state,
- isOpen: false,
- page: ,
- subtitle: 'Calculator Page',
- };
- case types.HELP:
- return {
- ...state,
- isOpen: false,
- page: ,
- subtitle: 'Help',
- };
- default:
- return state;
- }
+ switch (action.type) {
+ case types.MENUOPEN:
+ return {
+ ...state,
+ isOpen: true,
+ };
+ case types.MENUCLOSE:
+ return {
+ ...state,
+ isOpen: false,
+ };
+ case types.MAIN:
+ return {
+ ...state,
+ isOpen: false,
+ page: ,
+ subtitle: 'Calculator Page',
+ };
+ case types.HELP:
+ return {
+ ...state,
+ isOpen: false,
+ page: ,
+ subtitle: 'Help',
+ };
+ default:
+ return state;
+ }
}