fix: trade bottom nav active state for all sub-tabs#11971
fix: trade bottom nav active state for all sub-tabs#119710xApotheosis merged 3 commits intodevelopfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR extends the Trade route's related paths to include '/ramp/trade' and '/earn', and updates the mobile header text translation key from 'transactionRow.swap' to 'common.trade'. These changes ensure consistent bottom navigation highlighting across all trade-related sections and align page titles with navbar terminology. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
The Trade tab in mobile bottom navigation only showed as active for Swap and Limit routes. Buy, Sell, and Earn sub-tabs navigated to /ramp/trade/* and /earn/* which were missing from the relatedPaths array used for active state matching. Also fixes the mobile header title using 'Swap' instead of 'Trade' to match the bottom nav label. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
365d0ca to
38e1bbf
Compare
0xApotheosis
left a comment
There was a problem hiding this comment.
Does precisely as promised!
Description
The Trade tab in the mobile bottom navigation only showed as active for the Swap (
/trade) and Limit (/limit) routes. Clicking Buy, Sell, or Earn sub-tabs navigated to/ramp/trade/*and/earn/*respectively, which were missing from therelatedPathsarray used byMobileNavLinkfor active state matching.Changes:
/ramp/tradeand/earnto the Trade route'srelatedPathsarray inRoutesCommon.tsxcommon.trade("Trade") instead oftransactionRow.swap("Swap") for consistency with the bottom nav labelIssue (if applicable)
closes #11964
Risk
Near zero — only affects mobile bottom nav active state styling and a translation key for the mobile page title. No transaction logic, wallet interactions, or protocol changes.
None.
Testing
Engineering
Operations
Screenshots (if applicable)
Demo
https://jam.dev/c/76b60627-67a4-48f4-b747-edc034f88912
Summary by CodeRabbit