But history.push seems to mess up with toast?
Is there anything to make it work?
Code: Select all
const history = useHistory();
const handleRegister = (values) => {
authService
.register(values)
.then((res) => {
toast.current.show({
severity: "success",
summary: "Successfully Registered",
detail: "You are auto logged in",
});
history.push("/");
})