Last change
on this file since 843a941 was 3a58bd6, checked in by Viktor <39170279+Tasevski2@…>, 3 years ago |
Added Frontend
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | import { Link } from 'react-router-dom';
|
---|
2 | import useForm from '../../hooks/useForm';
|
---|
3 |
|
---|
4 | import {
|
---|
5 | CredentialsWrapper,
|
---|
6 | DividerButtons,
|
---|
7 | DividerText,
|
---|
8 | Input,
|
---|
9 | LockIcon,
|
---|
10 | PersonIcon,
|
---|
11 | SignInButton,
|
---|
12 | ButtonsWrapper,
|
---|
13 | RegisterText,
|
---|
14 | } from './styles';
|
---|
15 |
|
---|
16 | const Login = () => {
|
---|
17 | const { data, onFormChange } = useForm({
|
---|
18 | email: '',
|
---|
19 | password: '',
|
---|
20 | });
|
---|
21 | const handleSignIn = () => {
|
---|
22 | console.log(`Email: ${data.email}`);
|
---|
23 | console.log(`Password: ${data.password}`);
|
---|
24 | };
|
---|
25 | return (
|
---|
26 | <>
|
---|
27 | <CredentialsWrapper>
|
---|
28 | <Input
|
---|
29 | name='email'
|
---|
30 | value={data.email}
|
---|
31 | onChange={onFormChange}
|
---|
32 | InputProps={{
|
---|
33 | startAdornment: <PersonIcon />,
|
---|
34 | }}
|
---|
35 | />
|
---|
36 | <Input
|
---|
37 | name='password'
|
---|
38 | value={data.password}
|
---|
39 | onChange={onFormChange}
|
---|
40 | InputProps={{
|
---|
41 | startAdornment: <LockIcon />,
|
---|
42 | }}
|
---|
43 | type='password'
|
---|
44 | />
|
---|
45 | </CredentialsWrapper>
|
---|
46 | <ButtonsWrapper>
|
---|
47 | <SignInButton onClick={handleSignIn}>НАЈАВА</SignInButton>
|
---|
48 | <DividerButtons>
|
---|
49 | <DividerText>ИЛИ</DividerText>
|
---|
50 | </DividerButtons>
|
---|
51 | <SignInButton>НАЈАВА КАКО ГОСТИН</SignInButton>{' '}
|
---|
52 | {/* TODO Neka nosi do '/login-guest'*/}
|
---|
53 | </ButtonsWrapper>
|
---|
54 | <RegisterText>
|
---|
55 | {' '}
|
---|
56 | {/* TODO Neka nosi do '/register' */}
|
---|
57 | Немате Сметка?
|
---|
58 | <Link to='#'>Регистрирај се!</Link>
|
---|
59 | </RegisterText>
|
---|
60 | </>
|
---|
61 | );
|
---|
62 | };
|
---|
63 |
|
---|
64 | export default Login;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.