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

Prevent Page Reload on 'Send Message' and Add Success Toast Notification #272

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

Conversation

akshadgujarkar
Copy link
Contributor

Prevent Page Reload on "Send Message" and Add Success Toast Notification #269

Title : Prevent Page Reload on 'Send Message' and Add Success Toast Notification

Issue No. : #269

Code Stack : React.js

Close #269

Video (mandatory)

Screen.Recording.2024-10-18.233233.mp4

Checklist:

  • [x ] I have mentioned the issue number in my Pull Request.
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] I have created a helpful and easy to understand README.md if its a new page/tech stack
  • [ x] I have gone through the contributing.md file before contributing

Additional context (Mandatory )

  1. Prevent Default Form Behavior:
    I modified the form submission handler to prevent the default behavior of page reloading by using
    event.preventDefault(). This ensures that when the "Send Message" button is pressed, the page doesn't reload,
    preserving the current state of the application.
  2. Implement Toast Notification:
    I integrated a success toast notification using react-toastify that provides immediate feedback when the form is
    successfully submitted. The notification confirms that the message has been sent, enhancing the overall user
    experience.
    The toast message is styled to align with the application's theme (dark) and automatically closes after 3
    seconds, ensuring it's visible long enough for users to see the confirmation without being intrusive.

Are you contributing under any Open-source programme?

  • [x ] I'm a GSSOC-EXT contributor
  • I'm a HACKTOBERFEST contributor

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for befiteveryday ready!

Name Link
🔨 Latest commit bc08cfe
🔍 Latest deploy log https://app.netlify.com/sites/befiteveryday/deploys/6712a332b32a76000847eb05
😎 Deploy Preview https://deploy-preview-272--befiteveryday.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Prevent Page Reload on "Send Message" and Add Success Toast Notification
1 participant