-
-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support when navigating to another page #560
Comments
@randerso21 I'd need a minimal reproduction example to be able to help |
Does this work? `import React from "react"; function Hist() { const handleClick = () => { const handleClickVariant = (message: string, variant: any) => () => { return ( <title>"TESTING"</title> TESTING
); export default Hist2; |
import { useNavigate } from "react-router-dom";
const navigate = useNavigate();
const handleCreate = useCallback(
(e: any) => {
createName(props.name, props.description)
.then((response) => {
navigate("/");
enqueueSnackbar("Successfully added a new name", {variant: "success"});
})
.catch((error) => {
enqueueSnackbar(error.message.toString(), {variant: "error"});
});
},
[props.description, props.name, navigate]
);
I see the snackbar when I get the error, but when I am successful I do not see the snackbar
The text was updated successfully, but these errors were encountered: