mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-05 04:19:55 +00:00
check for valid email in Intro
This commit is contained in:
parent
122434cf95
commit
e13d31a40c
1 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ const Intro = ({ queryParams }) => {
|
|||
});
|
||||
}, []);
|
||||
const loginWithEmail = React.useCallback(() => {
|
||||
if (typeof state.email !== 'string' || state.email.length === 0) {
|
||||
if (typeof state.email !== 'string' || state.email.length === 0 || !emailRef.current.validity.valid) {
|
||||
dispatch({ type: 'error', error: 'Invalid email' });
|
||||
return;
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ const Intro = ({ queryParams }) => {
|
|||
window.location.replace('#/');
|
||||
}, [state.termsAccepted]);
|
||||
const signup = React.useCallback(() => {
|
||||
if (typeof state.email !== 'string' || state.email.length === 0) {
|
||||
if (typeof state.email !== 'string' || state.email.length === 0 || !emailRef.current.validity.valid) {
|
||||
dispatch({ type: 'error', error: 'Invalid email' });
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue