import { Button, Form, Input } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { techLoginStart } from "../../redux/tech/tech.actions"; import { selectLoginError, selectLoginLoading, selectTechnician, } from "../../redux/tech/tech.selectors"; import AlertComponent from "../alert/alert.component"; import "./tech-login.styles.scss"; import { Redirect } from "react-router-dom"; const mapStateToProps = createStructuredSelector({ technician: selectTechnician, loginError: selectLoginError, loginLoading: selectLoginLoading, }); const mapDispatchToProps = (dispatch) => ({ techLoginStart: (user) => dispatch(techLoginStart(user)), }); export function TechLogin({ technician, loginError, loginLoading, techLoginStart, }) { const { t } = useTranslation(); const handleFinish = (values) => { techLoginStart(values); }; return (
{technician ? : null}
{loginError ? : null}
); } export default connect(mapStateToProps, mapDispatchToProps)(TechLogin);