Refactor: Make error alert display above modals

This commit is contained in:
igorrCarvalho 2024-03-11 17:32:57 -03:00
commit 6a763993c1
2 changed files with 39 additions and 30 deletions

View file

@ -102,35 +102,44 @@ export default function App() {
)}
</ErrorBoundary>
<div></div>
<div className="app-div z-40">
{tempNotificationList.map((alert) => (
<div key={alert.id}>
{alert.type === "error" ? (
<ErrorAlert
key={alert.id}
title={alert.title}
list={alert.list}
id={alert.id}
removeAlert={removeAlert}
/>
) : alert.type === "notice" ? (
<NoticeAlert
key={alert.id}
title={alert.title}
link={alert.link}
id={alert.id}
removeAlert={removeAlert}
/>
) : (
<SuccessAlert
key={alert.id}
title={alert.title}
id={alert.id}
removeAlert={removeAlert}
/>
)}
</div>
))}
<div className="app-div">
<div className="flex flex-col-reverse" style={{zIndex: 999}}>
{tempNotificationList.map((alert) => (
<div key={alert.id}>
{alert.type === "error" && (
<ErrorAlert
key={alert.id}
title={alert.title}
list={alert.list}
id={alert.id}
removeAlert={removeAlert}
/>
)}
</div>
))}
</div>
<div className="flex flex-col-reverse z-40">
{tempNotificationList.map((alert) => (
<div key={alert.id}>
{alert.type === "notice" ? (
<NoticeAlert
key={alert.id}
title={alert.title}
link={alert.link}
id={alert.id}
removeAlert={removeAlert}
/>
) : alert.type === "success" && (
<SuccessAlert
key={alert.id}
title={alert.title}
id={alert.id}
removeAlert={removeAlert}
/>
)}
</div>
))}
</div>
</div>
</div>
);

View file

@ -584,7 +584,7 @@
}
.app-div {
@apply fixed bottom-5 left-5 flex flex-col-reverse;
@apply absolute bottom-5 left-5 flex flex-col-reverse;
}
.chat-input-modal-txtarea {