-
Notifications
You must be signed in to change notification settings - Fork 112
Fixed toast reappears when switching tabs #180
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
base: main
Are you sure you want to change the base?
Fixed toast reappears when switching tabs #180
Conversation
WalkthroughTwo files are modified: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.gitignore (1)
133-135: Unrelated change: Scope creep detected.The addition of
/setup.txtto.gitignoreis unrelated to the primary PR objective of fixing the toast reappearing when switching tabs (issue #171). While the change itself is syntactically valid, it represents scope creep and should ideally be split into a separate PR focused on project setup configuration.Additionally, I notice the AI summary references changes to
frontend/src/App.tsx(removing thetoast.success("Signed in!")line), but this file was not provided for review. Please ensure the primary fix file is included in the review for complete assessment.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.gitignore(1 hunks)frontend/src/App.tsx(0 hunks)
💤 Files with no reviewable changes (1)
- frontend/src/App.tsx
|
@smokeyScraper sir please review it |
Closes #171
📝 Description
The issue was that when a user successfully logs in, two "Signed in!" toast notifications would appear. One toast is correctly triggered by the child component (login.tsx), which is sufficient. However, an extra, irrelevant toast was being triggered in the parent component (app.jsx).
This duplication occurs because in React, components render in a parent-child format. When the child component renders after a successful login, the parent component (app.jsx) is often triggered to re-render as well. This recurring render in the parent caused the unnecessary, duplicate toast to appear every time.
🔧 Changes Made
" i had made changes in app.tsx just remove this line toast.success("Signed in!");"
📷 Screenshots or Visual Changes (if applicable)
before


after just one toast after login
🤝 Collaboration
NO
Collaborated with:
@username(optional)✅ Checklist
Yes for all
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.