diff --git a/src/routes/Intro/ConsentCheckbox/ConsentCheckbox.js b/src/routes/Intro/ConsentCheckbox/ConsentCheckbox.js index 156cb0637..c0176f934 100644 --- a/src/routes/Intro/ConsentCheckbox/ConsentCheckbox.js +++ b/src/routes/Intro/ConsentCheckbox/ConsentCheckbox.js @@ -2,7 +2,7 @@ const React = require('react'); const PropTypes = require('prop-types'); const classnames = require('classnames'); const { Input } = require('stremio-navigation'); -const { Checkbox } = require('stremio-common'); +const { Checkbox } = require('stremio/common'); const styles = require('./styles'); const ConsentCheckbox = React.forwardRef(({ className, checked, label, link, href, toggle }, ref) => { diff --git a/src/routes/Intro/Intro.js b/src/routes/Intro/Intro.js index 876cc6c92..7b1519ab9 100644 --- a/src/routes/Intro/Intro.js +++ b/src/routes/Intro/Intro.js @@ -76,8 +76,7 @@ class Intro extends React.Component { this.setState({ email: event.currentTarget.value }); } - emailOnSubmit = (event) => { - event.preventDefault(); + emailOnSubmit = () => { this.passwordRef.current.focus(); } @@ -85,8 +84,7 @@ class Intro extends React.Component { this.setState({ password: event.currentTarget.value }); } - passwordOnSubmit = (event) => { - event.preventDefault(); + passwordOnSubmit = () => { if (this.state.selectedForm === FORMS.LOGIN) { this.loginWithEmail(); } else { @@ -98,8 +96,7 @@ class Intro extends React.Component { this.setState({ confirmPassword: event.currentTarget.value }); } - confirmPasswordOnSubmit = (event) => { - event.preventDefault(); + confirmPasswordOnSubmit = () => { this.termsRef.current.focus(); } @@ -122,12 +119,12 @@ class Intro extends React.Component { } loginWithFacebook = () => { - alert('Facebook login'); + alert('TODO: Facebook login'); } loginWithEmail = () => { - if (this.state.email.length < 8) { - this.setState({ error: 'Please enter a valid email' }); + if (this.state.email.length === 0) { + this.setState({ error: 'Invalid email' }); return; } @@ -137,12 +134,12 @@ class Intro extends React.Component { } this.setState({ error: '' }); - alert('Email login'); + alert('TODO: Email login'); } signup = () => { - if (this.state.email.length < 8) { - this.setState({ error: 'Please enter a valid email' }); + if (this.state.email.length === 0) { + this.setState({ error: 'Invalid email' }); return; } @@ -167,7 +164,7 @@ class Intro extends React.Component { } this.setState({ error: '' }); - alert('Signup'); + alert('TODO: Signup'); } loginAsGuest = () => { @@ -177,16 +174,16 @@ class Intro extends React.Component { } this.setState({ error: '' }); - alert('Guest login'); + alert('TODO: Guest login'); } render() { return (