Skip to content

fix(ui): replace browser alerts with toast notifications#244

Open
SagitQuark wants to merge 1 commit into
rdodiya:gssoc_developfrom
SagitQuark:fix/toast-notifications
Open

fix(ui): replace browser alerts with toast notifications#244
SagitQuark wants to merge 1 commit into
rdodiya:gssoc_developfrom
SagitQuark:fix/toast-notifications

Conversation

@SagitQuark
Copy link
Copy Markdown
Contributor

Closes #227

Why this change?

The project already used react-hot-toast in several places, but a few admin workflows were still showing browser alert() dialogs when an action failed, this created an inconsistent user experience compared to the rest of the application.

This PR replaces those remaining alerts with toast notifications using the existing notification setup.

Changes made

  • Replaced browser alert() calls with toast.error() notifications
  • Updated menu-related error handling in MenusGrid.jsx
  • Updated branch delete/restore error handling in BranchesGrid.jsx
  • Reused the existing react-hot-toast implementation already used across the project
  • Preserved existing backend error messages where available

Files updated

  • src/components/admin/menu/menuCard/MenusGrid.jsx
  • src/components/admin/store/branch/BranchesGrid.jsx

Testing

  • Verified frontend compiles successfully after the changes
  • Verified affected admin pages load correctly
  • Confirmed all remaining alert() usages related to this issue have been removed

User-facing impact

Users will now see consistent toast notifications instead of browser alert popups when menu or branch actions failures

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.

Enhancement(ui): replace browser alerts with consistent toast notifications

1 participant