Skip to content

feat(web): wire toasts through Sonner on discover & organizers pages (#779)#809

Open
Rufai-Ahmed wants to merge 1 commit into
Agora-Events:mainfrom
Rufai-Ahmed:feat/sonner-toasts
Open

feat(web): wire toasts through Sonner on discover & organizers pages (#779)#809
Rufai-Ahmed wants to merge 1 commit into
Agora-Events:mainfrom
Rufai-Ahmed:feat/sonner-toasts

Conversation

@Rufai-Ahmed

Copy link
Copy Markdown

Summary

Routes the remaining ad-hoc notifications through the global Sonner provider, per #779.

Sonner is already installed and <Toaster /> is mounted in apps/web/app/layout.tsx, and create-event / TicketModal already use toast. However the discover and organizers pages each reimplemented their own toast (local toastMessage state + setTimeout + a hand-rolled fixed div) instead of using it. This PR replaces those with toast.error() so all pages share one consistent, accessible toast system.

Changes

  • app/discover/page.tsx & app/organizers/page.tsx: drop the ad-hoc toastMessage state and rendered <div>; showErrorToast now calls toast.error(message) from sonner (removed the now-unused useState import in organizers).
  • app/layout.tsx: set <Toaster position="bottom-right" /> to match the acceptance criteria (was top-right), and added a usage doc-comment at the top of the file.

Acceptance criteria

  • ✅ Toasts now render bottom-right across all pages via the single global <Toaster />.
  • ✅ The discover/organizers error callbacks go through toast.error instead of a separate, easily-missed local banner.

Note

I changed the Toaster position from top-right to bottom-right to match the issue's acceptance criteria — happy to revert if top-right was intentional. Couldn't run a full next build in my environment (Next's SWC binary download was blocked), but the changes mirror the existing toast usage already working in create-event/TicketModal.

Closes #779

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@Rufai-Ahmed is attempting to deploy a commit to the oseh-svg's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

## FRONTEND: Integrate Sonner Toast Notification System

1 participant