import React from 'react' import authBg from '../images/authBg.png' import { connect } from 'react-redux' import { NavLink} from 'react-router-dom' import { Form, Input, Button, Row, Col, Card, Divider, Checkbox } from 'antd'; import { UserOutlined, LockOutlined } from '@ant-design/icons'; import { actionFullLogIn, actionFullRegister } from '../actions'; const FormInput = ({ buttonTitle, onSignIn }) => { const onFinish = ({ login, password, remember }) => { onSignIn(login, password, remember) }; return (
} placeholder="Username" /> } type="password" placeholder="Password" /> Remember me
) } const CLoginForm = connect(null, { onSignIn: actionFullLogIn})(FormInput) const CRegisterForm = connect(null, { onSignIn: actionFullRegister})(FormInput) export const Authorization = ({ match: { params: { _id } } }) => { return (
Log In Registration {_id === 'login' ? 'Log in' : 'Registration'} {_id === 'login' ? : }
) }