Diversas melhorias e toasts aparecem em redirecionamentos de páginas

This commit is contained in:
Matheus Albino Brunhara
2022-06-20 05:25:00 -05:00
parent 3e63a74fc9
commit b1120248b9
9 changed files with 315 additions and 131 deletions

View File

@@ -89,7 +89,11 @@ const Page: React.FC = () => {
user.setIsLoggedIn(true);
history.push({ pathname: '/home' });
history.push({ pathname: '/home', state: { redirectData: {
showToastMessage: true,
toastColor: "success",
toastMessage: "Usuário autenticado com sucesso!",
}}})
}).catch(error => {
// if (!error.response) return
@@ -155,7 +159,7 @@ const Page: React.FC = () => {
</IonGrid>
<IonToast
// cssClass={"toast-notification"}
position="top"
color='danger'
isOpen={showToast}
onDidDismiss={() => setShowToast(false)}