Ignore:
Timestamp:
02/14/22 01:41:41 (2 years ago)
Author:
Tasevski2 <39170279+Tasevski2@…>
Branches:
master
Children:
747e0ab
Parents:
e8b1076
Message:

Push before video

Location:
sources/client/src/components/Auth
Files:
6 added
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';
     1import { Link, useHistory } from 'react-router-dom';
     2import useForm from '../../../hooks/useForm';
     3import useLogin from '../../../hooks/useLogin';
    34
    45import {
     
    1516
    1617const Login = () => {
     18  const { loginUser } = useLogin();
    1719  const { data, onFormChange } = useForm({
    1820    email: '',
    1921    password: '',
    2022  });
     23  let history = useHistory();
    2124  const handleSignIn = () => {
    22     console.log(`Email: ${data.email}`);
    23     console.log(`Password: ${data.password}`);
     25    loginUser({ email: data.email, password: data.password });
    2426  };
    2527  return (
     
    2830        <Input
    2931          name='email'
     32          placeholder='Емаил'
    3033          value={data.email}
    3134          onChange={onFormChange}
     
    3740          name='password'
    3841          value={data.password}
     42          placeholder='Лозинка'
    3943          onChange={onFormChange}
    4044          InputProps={{
     
    4953          <DividerText>ИЛИ</DividerText>
    5054        </DividerButtons>
    51         <SignInButton>НАЈАВА КАКО ГОСТИН</SignInButton>{' '}
     55        <SignInButton onClick={() => history.push('/login-guest')}>
     56          НАЈАВА КАКО ГОСТИН
     57        </SignInButton>
    5258        {/* TODO Neka nosi do '/login-guest'*/}
    5359      </ButtonsWrapper>
     
    5561        {' '}
    5662        {/* TODO Neka nosi do '/register' */}
    57         Немате Сметка?
    58         <Link to='#'>Регистрирај се!</Link>
     63        Немате Профил?
     64        <Link to='/register'>Регистрирај се!</Link>
    5965      </RegisterText>
    6066    </>
  • sources/client/src/components/Auth/Login/styles.js

    re8b1076 rbc20307  
    1616  fullWidth: true,
    1717  sx: {
    18     marginTop: '35px',
     18    marginTop: '25px',
    1919  },
    2020})`
     
    2626    font-size: 1.2rem;
    2727    padding-left: 10px;
     28
     29    ::placeholder {
     30      opacity: 0.6;
     31    }
    2832  }
    2933
    3034  fieldset {
    3135    border: 0;
    32     border-bottom: 2px solid white;
     36    border-bottom: 4px solid white;
    3337    border-radius: 25px;
    3438    padding: 0 10px;
     
    5357  display: flex;
    5458  flex-direction: column;
    55   padding: 30px 25px;
     59  margin-top: 10px;
     60  padding: 30px 0px;
    5661`;
    5762export const SignInButton = styled(Button).attrs((props) => ({
     
    7782  sx: {},
    7883})`
    79   align-items: flex-start;
    80   margin-bottom: 15px;
     84  align-items: center;
     85  // margin-bottom: 15px;
    8186  ::before,
    8287  ::after {
     
    9297  position: absolute;
    9398  bottom: 0;
    94   align-self: cetner;
    9599  width: 100%;
    96100  text-align: center;
     
    100104    margin-left: 10px;
    101105    text-decoration: none;
    102     color: #f65026;
     106    color: ${(props) => props.theme.palette.third.main};
    103107    font-weight: bold;
    104108    font-size: 1.2rem;
Note: See TracChangeset for help on using the changeset viewer.