backedn converted to ts

This commit is contained in:
QkoSad
2023-07-27 15:58:35 +03:00
parent 3bf4e9fc56
commit 40051f9d5e
18 changed files with 1394 additions and 29668 deletions
+2 -7
View File
@@ -9,11 +9,6 @@ const Login = () => {
const dispatch = useAppDispatch();
const isAuthenticated = useAppSelector((state) => state.auth.isAuthenticated);
const onChangeEmail = () =>
setEmail(email)
const onChangePasword = () =>
setPassword(password)
const onSubmit = async (e: React.SyntheticEvent) => {
e.preventDefault();
await dispatch(login(email, password));
@@ -36,7 +31,7 @@ const Login = () => {
placeholder="Email Address"
name="email"
value={email}
onChange={onChangeEmail}
onChange={(e) => setEmail(e.target.value)}
/>
</div>
<div className="form-group">
@@ -45,7 +40,7 @@ const Login = () => {
placeholder="Password"
name="password"
value={password}
onChange={onChangePasword}
onChange={(e)=>setPassword(e.target.value)}
//used to be "6"
minLength={6}
/>
+4 -4
View File
@@ -40,7 +40,7 @@ const Register = () => {
placeholder="Name"
name="name"
value={name}
onChange={() => setName(name)}
onChange={(e) => setName(e.target.value)}
/>
</div>
<div className="form-group">
@@ -49,7 +49,7 @@ const Register = () => {
placeholder="Email Address"
name="email"
value={email}
onChange={() => setEmail(email)}
onChange={(e) => setEmail(e.target.value)}
/>
<small className="form-text">
This site uses Gravatar so if you want a profile image, use a
@@ -62,7 +62,7 @@ const Register = () => {
placeholder="Password"
name="password"
value={password}
onChange={() => setPassword(password)}
onChange={(e) => setPassword(e.target.value)}
/>
</div>
<div className="form-group">
@@ -71,7 +71,7 @@ const Register = () => {
placeholder="Confirm Password"
name="password2"
value={password2}
onChange={() => setPassword2(password2)}
onChange={(e) => setPassword2(e.target.value)}
/>
</div>
<input type="submit" className="btn btn-primary" value="Register" />