This commit is contained in:
Dave Richer
2023-12-06 17:35:27 -05:00
parent a043f7be24
commit 5c164f807d
68 changed files with 279 additions and 294 deletions

View File

@@ -11,7 +11,7 @@ import {
} from "../../redux/tech/tech.selectors";
import AlertComponent from "../alert/alert.component";
import "./tech-login.styles.scss";
import { Redirect } from "react-router-dom";
import { useNavigate } from "react-router-dom";
const mapStateToProps = createStructuredSelector({
technician: selectTechnician,
@@ -30,14 +30,16 @@ export function TechLogin({
techLoginStart,
}) {
const { t } = useTranslation();
const navigate = useNavigate();
const handleFinish = (values) => {
techLoginStart(values);
};
if (technician) return navigate("/tech/joblookup");
return (
<div className="tech-login-container">
{technician ? <Redirect to={`/tech/joblookup`} /> : null}
<Form
layout="vertical"
onFinish={handleFinish}