diff --git a/app/components/routes/home.js b/app/components/routes/home.js index 6d5a6f5..afd9787 100644 --- a/app/components/routes/home.js +++ b/app/components/routes/home.js @@ -42,11 +42,6 @@ export default class Home extends React.Component { } componentDidMount() { - getProjects().then(function (data) { - this.setState({ - projects: data - }); - }.bind(this)).catch(console.log); } render() { diff --git a/app/components/routes/login.js b/app/components/routes/login.js index ac0c1a5..a31c59f 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -19,7 +19,8 @@ const { BackAndroid, TouchableWithoutFeedback, Alert, - Image + Image, + Animated } = React; const styles = StyleSheet.create({ @@ -59,7 +60,7 @@ const styles = StyleSheet.create({ margin: 5 }, heading: { - fontSize: 15, + fontSize: 14, }, helpText: { fontSize: 10, @@ -83,6 +84,19 @@ export default class Login extends React.Component { token: '', showTokenHelp: false }; + this.animate = new Animated.Value(2); + this.viewAnimate = { + transform: [ // Array order matters + {scale: this.animate.interpolate({ + inputRange: [0, 1], + outputRange: [1, 0.4], + })}, + {translateY: this.animate.interpolate({ + inputRange: [0, 1], + outputRange: [0, -100], + })}, + ] + }; this.validate = this.validate.bind(this); this.textChanged = this.textChanged.bind(this); this.showTokenHelp = this.showTokenHelp.bind(this); @@ -152,13 +166,20 @@ export default class Login extends React.Component { BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button } + componentDidMount() { + Animated.spring(this.animate, { + toValue: 0, + tension: 30, + }).start(); + } + render() { return ( -