aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Login.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-05-31 06:10:51 +0300
committerGravatar Vitaly Takmazov2023-05-31 06:11:05 +0300
commitf2a7ea3af919548d41383734e8a3667086a44bcc (patch)
treee0d9db07956f10ccc4e27fc9e0d45d88950dbfbb /vnext/src/ui/Login.js
parent395185d093b2d6bb46d02830088e00a3a2ca20c1 (diff)
eslint: enforce semicolons only before statement continuation chars
Diffstat (limited to 'vnext/src/ui/Login.js')
-rw-r--r--vnext/src/ui/Login.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/vnext/src/ui/Login.js b/vnext/src/ui/Login.js
index 73da49c8..5d9908cb 100644
--- a/vnext/src/ui/Login.js
+++ b/vnext/src/ui/Login.js
@@ -1,13 +1,13 @@
-import { useEffect } from 'react';
-import { useLocation, useNavigate } from 'react-router-dom';
+import { useEffect } from 'react'
+import { useLocation, useNavigate } from 'react-router-dom'
-import Icon from './Icon';
-import Button from './Button';
-import { useForm } from 'react-hook-form';
+import Icon from './Icon'
+import Button from './Button'
+import { useForm } from 'react-hook-form'
-import { me, facebookLink, vkLink, appleLink } from '../api';
+import { me, facebookLink, vkLink, appleLink } from '../api'
-import { useVisitor } from './VisitorContext';
+import { useVisitor } from './VisitorContext'
/**
* @typedef {object} LoginProps
@@ -19,29 +19,29 @@ import { useVisitor } from './VisitorContext';
* @param {LoginProps} props
*/
function Login({ onAuth }) {
- const location = useLocation();
- const navigate = useNavigate();
- const [visitor] = useVisitor();
+ const location = useLocation()
+ const navigate = useNavigate()
+ const [visitor] = useVisitor()
useEffect(() => {
if (visitor.hash) {
- const {retpath } = location.state || '/';
- console.log(retpath);
- navigate(retpath);
+ const {retpath } = location.state || '/'
+ console.log(retpath)
+ navigate(retpath)
}
- }, [navigate, location.state, visitor]);
+ }, [navigate, location.state, visitor])
- const { register, handleSubmit } = useForm();
+ const { register, handleSubmit } = useForm()
/** @type { import('react-hook-form').SubmitHandler<import('react-hook-form').FieldValues> } */
let onSubmit = (values) => {
me(values.username, values.password)
.then(response => {
- onAuth(response);
+ onAuth(response)
}
).catch(ex => {
- console.log(ex);
- });
- };
+ console.log(ex)
+ })
+ }
return (
<div className="msg-cont">
<div className="dialoglogin">
@@ -64,25 +64,25 @@ function Login({ onAuth }) {
</form>
</div>
</div>
- );
+ )
}
-export default Login;
+export default Login
const socialButtonsStyle = {
display: 'flex',
justifyContent: 'space-evenly',
padding: '4px'
-};
+}
const facebookButtonStyle = {
color: '#fff',
padding: '2px 14px',
background: '#3b5998'
-};
+}
const vkButtonStyle = {
color: '#fff',
padding: '2px 14px',
background: '#4c75a3'
-};
+}