Changeset 0f5aa27 for frontend/src/Components/Login
- Timestamp:
- 02/04/24 16:57:49 (14 months ago)
- Branches:
- master
- Children:
- efaa053
- Parents:
- 07f4e8b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/Login/LoginForm.js
r07f4e8b r0f5aa27 5 5 import useLogin from "../Hooks/User/useLogin"; 6 6 import { Link } from "react-router-dom"; 7 import useCreate from "../Hooks/useCreate"; 8 import {useAuth} from "../Context/AuthContext"; 7 9 8 const LoginForm = ( ) => {10 const LoginForm = (props) => { 9 11 const { formData, onFormChange, onCheckBoxChange, setFormData } = useFormData( 10 12 { 11 email: "",13 username: "", 12 14 password: "", 13 15 } 14 16 ); 15 17 16 const { login } = useLogin(); 18 const { createEntity } = useCreate(); 19 const Auth = useAuth(); 17 20 18 21 return ( … … 27 30 type="email" 28 31 placeholder="Enter email" 29 name=" email"32 name="username" 30 33 onChange={onFormChange} 31 34 value={formData.email} 32 35 /> 33 <Form.Text className="text-muted">34 Вашите податоци никогаш нема да бидат споделени.35 </Form.Text>36 36 </Form.Group> 37 37 … … 46 46 /> 47 47 </Form.Group> 48 <Form.Group className="mb-3" controlId="formBasicCheckbox">49 <Form.Check type="checkbox" label="Check me out" />50 </Form.Group>51 <Link to={"/register"} style={{textDecoration: "none"}}>52 <Form.Text className="text-muted" style={{color: "#159895!important"}} >53 Регистритрај се54 </Form.Text>55 </Link>48 {/*<Form.Group className="mb-3" controlId="formBasicCheckbox">*/} 49 {/* <Form.Check type="checkbox" label="Check me out" />*/} 50 {/*</Form.Group>*/} 51 {/*<Link to={"/register"} style={{textDecoration: "none"}}>*/} 52 {/* <Form.Text className="text-muted" style={{color: "#159895!important"}} >*/} 53 {/* Регистритрај се*/} 54 {/* </Form.Text>*/} 55 {/*</Link>*/} 56 56 <Form.Group className="my-1"> 57 57 <Button … … 62 62 e.preventDefault(); 63 63 console.log(formData); 64 login(formData)64 createEntity(`/users/${Auth.getUser().userId}/connect`, formData, props.refresh) 65 65 }} 66 66 > … … 68 68 <AiFillLock /> 69 69 </span> 70 <span className="ikona mx-3"> Најави се</span>70 <span className="ikona mx-3">Поврзи</span> 71 71 </Button> 72 72 </Form.Group>
Note:
See TracChangeset
for help on using the changeset viewer.