Skip to content
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

feat(alert-hook): added alert hook to display danger and success snac… #186

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pushkarsaneja
Copy link

References to the issues

#157
#155
#154
#180

Description

useAlert hook to display success and danger snackbars. The alert message disappears after 5 seconds or if the user closes the alert message.

Changes

Added an AlertProvider component that provides a useAlert() hook which uses react context under the hood. The hook returns a function alertUser(message,type) which accepts message and type as parameters.

Implementation

The alertUser() is implemented in Pages>Home>index.jsx at line 80 and 88. Other Alerts can be changed to use hooks as well (will do it after the code is reviewed).

Snackbar.mp4

@GMishx GMishx added needs review Need code review needs test Needs testing has merge conflicts PR has merge conflicts, require rebase labels May 30, 2022
@GMishx
Copy link
Member

GMishx commented May 30, 2022

@Shruti3004 @sjha2048 can you please look into this PR?

@GMishx
Copy link
Member

GMishx commented May 30, 2022

@pushkarsaneja can you please rebase the branch with latest main to resolve the merge conflict?

@Rbcoder1
Copy link

i would like to contribute in this issue. can i solved it?

@github-actions github-actions bot removed the has merge conflicts PR has merge conflicts, require rebase label Jan 25, 2023
@viv9k
Copy link
Member

viv9k commented Jan 25, 2023

Test is needed for this, fixed merge conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Need code review needs test Needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants