feat: add back button to referral screen with history fallback logic#5
feat: add back button to referral screen with history fallback logic#5ldsgroups225 merged 1 commit intomainfrom
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA back button feature was added to the Referral screen. The ReferralsPage component now uses the router's history to conditionally navigate backward if prior navigation history exists, otherwise defaults to navigating to /app. The AppHeader component was updated with a new showBackButton prop to enable the button. Changes
Sequence DiagramsequenceDiagram
participant User
participant ReferralsPage
participant AppHeader
participant Router
User->>AppHeader: Click Back Button
AppHeader->>ReferralsPage: onBackClick()
ReferralsPage->>Router: Check router.history.length
alt History exists
Router->>Router: history.back()
else No history
Router->>Router: navigate to /app
end
Router->>User: Navigate to destination
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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 |
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.