-
Notifications
You must be signed in to change notification settings - Fork 69
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
fix: Alert can't be dismissed #2216
fix: Alert can't be dismissed #2216
Conversation
@flacial is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report
@@ Coverage Diff @@
## master #2216 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 173 173
Lines 2948 2951 +3
Branches 794 796 +2
=========================================
+ Hits 2948 2951 +3
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
variant={`${type === 'urgent' ? 'danger' : 'primary'}`} | ||
onClose={() => { | ||
setShow(false) | ||
onDismiss && onDismiss(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity and to confirm, does onDismiss
handle whether or not the alert will be displayed for particular user in the future(if the user clicks the x button to dismiss)?
It appears the frontend is handled by setShow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't handle it. It gets called when the alert is closed. It's useful when we want to perform a certain action when the alert closes.
Closes #2215
Problem
The Alert component can't be dismissed through clicking the close button.
Solution
Replace its implementation with react-bootstrap alert component.