Changeset bc20307 for sources/client/src/components/Auth/Login
- Timestamp:
- 02/14/22 01:41:41 (2 years ago)
- Branches:
- master
- Children:
- 747e0ab
- Parents:
- e8b1076
- Location:
- sources/client/src/components/Auth/Login
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
sources/client/src/components/Auth/Login/index.js
re8b1076 rbc20307 1 import { Link } from 'react-router-dom'; 2 import useForm from '../../hooks/useForm'; 1 import { Link, useHistory } from 'react-router-dom'; 2 import useForm from '../../../hooks/useForm'; 3 import useLogin from '../../../hooks/useLogin'; 3 4 4 5 import { … … 15 16 16 17 const Login = () => { 18 const { loginUser } = useLogin(); 17 19 const { data, onFormChange } = useForm({ 18 20 email: '', 19 21 password: '', 20 22 }); 23 let history = useHistory(); 21 24 const handleSignIn = () => { 22 console.log(`Email: ${data.email}`); 23 console.log(`Password: ${data.password}`); 25 loginUser({ email: data.email, password: data.password }); 24 26 }; 25 27 return ( … … 28 30 <Input 29 31 name='email' 32 placeholder='Емаил' 30 33 value={data.email} 31 34 onChange={onFormChange} … … 37 40 name='password' 38 41 value={data.password} 42 placeholder='Лозинка' 39 43 onChange={onFormChange} 40 44 InputProps={{ … … 49 53 <DividerText>ИЛИ</DividerText> 50 54 </DividerButtons> 51 <SignInButton>НАЈАВА КАКО ГОСТИН</SignInButton>{' '} 55 <SignInButton onClick={() => history.push('/login-guest')}> 56 НАЈАВА КАКО ГОСТИН 57 </SignInButton> 52 58 {/* TODO Neka nosi do '/login-guest'*/} 53 59 </ButtonsWrapper> … … 55 61 {' '} 56 62 {/* TODO Neka nosi do '/register' */} 57 Немате Сметка?58 <Link to=' #'>Регистрирај се!</Link>63 Немате Профил? 64 <Link to='/register'>Регистрирај се!</Link> 59 65 </RegisterText> 60 66 </> -
sources/client/src/components/Auth/Login/styles.js
re8b1076 rbc20307 16 16 fullWidth: true, 17 17 sx: { 18 marginTop: ' 35px',18 marginTop: '25px', 19 19 }, 20 20 })` … … 26 26 font-size: 1.2rem; 27 27 padding-left: 10px; 28 29 ::placeholder { 30 opacity: 0.6; 31 } 28 32 } 29 33 30 34 fieldset { 31 35 border: 0; 32 border-bottom: 2px solid white;36 border-bottom: 4px solid white; 33 37 border-radius: 25px; 34 38 padding: 0 10px; … … 53 57 display: flex; 54 58 flex-direction: column; 55 padding: 30px 25px; 59 margin-top: 10px; 60 padding: 30px 0px; 56 61 `; 57 62 export const SignInButton = styled(Button).attrs((props) => ({ … … 77 82 sx: {}, 78 83 })` 79 align-items: flex-start;80 margin-bottom: 15px;84 align-items: center; 85 // margin-bottom: 15px; 81 86 ::before, 82 87 ::after { … … 92 97 position: absolute; 93 98 bottom: 0; 94 align-self: cetner;95 99 width: 100%; 96 100 text-align: center; … … 100 104 margin-left: 10px; 101 105 text-decoration: none; 102 color: #f65026;106 color: ${(props) => props.theme.palette.third.main}; 103 107 font-weight: bold; 104 108 font-size: 1.2rem;
Note:
See TracChangeset
for help on using the changeset viewer.