fix: trade bottom nav active state for all sub-tabs#11971
fix: trade bottom nav active state for all sub-tabs#11971premiumjibles wants to merge 2 commits intodevelopfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ 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
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