source: sources/client/src/components/Auth/LoginGuest/index.js@ bc20307

Last change on this file since bc20307 was bc20307, checked in by Tasevski2 <39170279+Tasevski2@…>, 2 years ago

Push before video

  • Property mode set to 100644
File size: 1.7 KB
Line 
1import { Link } from 'react-router-dom';
2import useForm from '../../../hooks/useForm';
3import useLoginGuest from '../../../hooks/useLoginGuest';
4
5import {
6 CredentialsWrapper,
7 Input,
8 PersonIcon,
9 PhoneIcon,
10 CarIcon,
11 SignInButton,
12 LoginText,
13} from './styles';
14
15const LoginGuest = () => {
16 const {loginGuest} = useLoginGuest();
17 const { data, onFormChange } = useForm({
18 mobile: '',
19 email: '',
20 plate: '',
21 });
22 return (
23 <>
24 <CredentialsWrapper>
25 <Input
26 name='mobile'
27 placeholder='Телефонски број'
28 value={data.mobile}
29 onChange={onFormChange}
30 InputProps={{
31 startAdornment: <PhoneIcon />,
32 }}
33 />
34 <Input
35 name='email'
36 placeholder='Емаил адреса'
37 value={data.email}
38 onChange={onFormChange}
39 InputProps={{
40 startAdornment: <PersonIcon />,
41 }}
42 />
43 <Input
44 name='plate'
45 placeholder='Таблица...SK-8190-AV'
46 value={data.plate}
47 onChange={onFormChange}
48 InputProps={{
49 startAdornment: <CarIcon />,
50 }}
51 />
52 </CredentialsWrapper>
53 <SignInButton onClick={() => loginGuest({ credentials: data })}>
54 НАЈАВА КАКО ГОСТИН
55 </SignInButton>
56 <LoginText>
57 Имате Профил? <Link to='/login'>Најавете се!</Link>
58 </LoginText>
59 </>
60 );
61};
62
63export default LoginGuest;
Note: See TracBrowser for help on using the repository browser.