Skip to content

fix : replaced alert call with toast notification in DashboardTasks - #1976

Open
tmdeveloper007 wants to merge 1 commit into
aryandas2911:mainfrom
tmdeveloper007:#1971
Open

fix : replaced alert call with toast notification in DashboardTasks#1976
tmdeveloper007 wants to merge 1 commit into
aryandas2911:mainfrom
tmdeveloper007:#1971

Conversation

@tmdeveloper007

Copy link
Copy Markdown

Summary of What Has Been Done

Replaced the browser alert() call in the DashboardTasks.jsx component with a toast notification for duration validation errors.

Changes Made

  1. Added a local Toast component (matching the pattern used in Tasks.jsx) that renders at the bottom-right of the screen.
  2. Added toast state and a showToast helper function with auto-dismiss after 3000ms.
  3. Replaced alert("Please enter a valid duration in minutes") with showToast("Please enter a valid duration in minutes", "error").
  4. Added useEffect cleanup to clear the toast timer on unmount.
  5. Added dark-mode-aware styling to the duration modal (dark background, light text, proper border colors).

Impact it Made

  • Users see a polished, non-blocking toast notification instead of a jarring browser alert.
  • Duration modal is now dark-mode compatible.
  • Consistent with the toast-based UX pattern used elsewhere in the application.

Note: please assign this PR to the tmdeveloper007 account.

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.

1 participant