Skip to content

fix: handle danger toast case explicitly#47

Merged
occult merged 1 commit into
mainfrom
fix/danger-toast-case
Jan 8, 2026
Merged

fix: handle danger toast case explicitly#47
occult merged 1 commit into
mainfrom
fix/danger-toast-case

Conversation

@occult

@occult occult commented Jan 8, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #42

The danger case in useFlashToasts was using JavaScript fallthrough to the error case. While this technically worked, it was confusing and looked like the case was empty/unhandled.

Changes

  • Made the danger case explicit with its own toast.error(message) call
  • Kept the error case for compatibility

Before

case "danger":
case "error":
  toast.error(message);
  break;

After

case "danger":
  toast.error(message);
  break;
case "error":
  toast.error(message);
  break;

Both approaches work identically, but the explicit version is clearer.

Fixes #42

The danger case was using fallthrough to error, which worked but
was confusing. Now both cases are explicit for clarity.
@occult occult merged commit 71ae331 into main Jan 8, 2026
1 check passed
felipekafuri pushed a commit to axioms-studio/bandeira that referenced this pull request Feb 18, 2026
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.

Incomplete switch stmt in hook useFlashToasts

1 participant