refactor(web): update to react 18 and other deps (#285)

* Started refactoring codebase for React 18.

* Migrated to react-router v6 fully

* Removed useless test setup along with relevant packages.

* Removed leftover console.log statement

* feat: use status forbidden for onboarding

* refactor(web): use react hook form on login

* fix: comply with r18 shenanigans

* chore: update packages
This commit is contained in:
stacksmash76 2022-06-10 19:31:46 +02:00 committed by GitHub
parent d065fee16b
commit 4d753b76ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 2252 additions and 2145 deletions

View file

@ -1,6 +1,6 @@
import { Form, Formik } from "formik";
import { useMutation } from "react-query";
import { useHistory } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { APIClient } from "../../api/APIClient";
import { TextField, PasswordField } from "../../components/inputs";
@ -30,15 +30,11 @@ export const Onboarding = () => {
return obj;
};
const history = useHistory();
const navigate = useNavigate();
const mutation = useMutation(
(data: InputValues) => APIClient.auth.onboard(data.username, data.password1),
{
onSuccess: () => {
history.push("/login");
}
}
{ onSuccess: () => navigate("/login") }
);
return (