diff options
author | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-20 19:34:10 -0700 |
---|---|---|
committer | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-20 19:34:10 -0700 |
commit | 3902da1747a3e32db0b67f1162eafd4860b3d27a (patch) | |
tree | c6673fb1a8620d277d7f88320e1c78894913f22b /client/components/sign_in/_sign_in.jsx | |
parent | 63c02f62aa3c57f72602a9efe89dc0780d6d3079 (diff) | |
download | locchat-3902da1747a3e32db0b67f1162eafd4860b3d27a.tar.gz locchat-3902da1747a3e32db0b67f1162eafd4860b3d27a.zip |
working on signup implementation
Diffstat (limited to 'client/components/sign_in/_sign_in.jsx')
-rw-r--r-- | client/components/sign_in/_sign_in.jsx | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/client/components/sign_in/_sign_in.jsx b/client/components/sign_in/_sign_in.jsx index 099ecd6..753b2b5 100644 --- a/client/components/sign_in/_sign_in.jsx +++ b/client/components/sign_in/_sign_in.jsx @@ -1,3 +1,37 @@ +import { useState } from 'react'; +import { useNavigate } from 'react-router'; + export const SignIn = () => { - return <div>I am the sign in page</div>; + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const navigate = useNavigate(); + + const goToSignUp = () => { + navigate('/signup'); + }; + + return ( + <div> + <div>Email</div> + <input + type="email" + value={email} + onChange={(e) => setEmail(e.target.value)} + /> + <div>Password</div> + <input + type="password" + value={password} + onChange={(e) => setPassword(e.target.value)} + /> + <div> + <button type="button">Sign in</button> + </div> + <div> + <button type="button" onClick={goToSignUp}> + Sign up + </button> + </div> + </div> + ); }; |