From fbdaa40e7ce585b65038835c05a283cec6f28d0e Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Wed, 24 Jun 2020 00:52:26 +0300
Subject: chore: migrate to which-types@1.3.1

---
 src/pages/AuthPage/SignUpForm.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/pages/AuthPage/SignUpForm.tsx')

diff --git a/src/pages/AuthPage/SignUpForm.tsx b/src/pages/AuthPage/SignUpForm.tsx
index 2769eb0..0e3d0c7 100644
--- a/src/pages/AuthPage/SignUpForm.tsx
+++ b/src/pages/AuthPage/SignUpForm.tsx
@@ -31,12 +31,11 @@ const SignUpForm: React.FC<PropTypes> = ({ logIn }) => {
   const inputRefPassword = useRef<HTMLInputElement>();
 
   const onClick = () => {
-    const name = inputRef.current?.value;
+    const username = inputRef.current?.value;
     const password = inputRefPassword.current?.value;
-    const newUser = { name, password };
-    if (name && password) {
-      post('/users', newUser).then(() => {
-        logIn(name, password);
+    if (username && password) {
+      post('/users', { username, password }).then(() => {
+        logIn(username, password);
       });
     }
   };
-- 
cgit v1.2.3

