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

Add Notification Page for Notices in agrotech #1003

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

IkkiOcean
Copy link
Contributor

PR Title: Add Notification Page for Notices

Overview

This PR introduces a new notification system for the notices section of the Agroshop website. The notification component is triggered when a new notice is added by the admin, providing feedback to the user. This feature includes the following components:

  1. Notification Component: A reusable component that displays a notification at the top-right of the screen when a new notice is added.
  2. Notices Section: Updated to include functionality for adding new notices and triggering notifications. The section includes both admin and user views.
  3. App Component: Updated to manage the notification state and render the Notification component conditionally.

Changes:

  • Notification Component (Notification.js):

    • Displays a notification at the top-right of the page when a new notice is successfully added.
    • Notification automatically disappears after 3 seconds.
  • Notices Section (NoticesSection.js):

    • New admin functionality to add, activate/deactivate, and delete notices.
    • When a new notice is added, the Notification component is triggered.
  • App Component (App.js):

    • Includes state management for the notification component (showNotification state) to control when the notification is visible.

Screenshots:

notif.mp4

Additional Notes:

  • The Notification component uses a simple timeout to hide the notification after a short period.
  • The NoticesSection component provides both admin and user views, with the admin being able to add, update, and delete notices.
  • Make sure the isAdmin flag is set to true to view the admin functionality.

Related Issues:

Copy link

vercel bot commented Nov 10, 2024

Deployment failed with the following error:

Resource is limited - try again in 28 minutes (more than 100, code: "api-deployments-free-per-day").

Copy link
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@IkkiOcean IkkiOcean changed the title notification_page Add Notification Page for Notices in agrotech Nov 10, 2024
@manikumarreddyu manikumarreddyu merged commit 6b23592 into manikumarreddyu:main Nov 10, 2024
2 of 3 checks passed
Copy link
Contributor

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

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

Successfully merging this pull request may close these issues.

Create Admin Notice Board to Notify Users on Agrotech Platform
2 participants