Skip to content

Conversation

@0xApotheosis
Copy link
Member

@0xApotheosis 0xApotheosis commented Oct 29, 2025

Fixes the buy/sell button, preserving the UTM params.

Closes shapeshift/web#10933

Summary by CodeRabbit

  • Chores
    • Updated navigation routing structure for the buy-crypto feature with improved URL formatting while maintaining all campaign tracking parameters for analytics purposes.

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website-frontend Ready Ready Preview Comment Oct 29, 2025 1:17am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

📝 Walkthrough

Walkthrough

Two external links in the constants file are updated to use the new buy-crypto route format. URLs are shifted from query-based paths with hash routing (/?utm_source=...#/buy-crypto) to hash-based routes with query parameters (/#/buy-crypto?utm_source=...) while preserving campaign tracking parameters.

Changes

Cohort / File(s) Summary
Buy-Crypto Link Updates
app/[lang]/_utils/constants.tsx
Updated hrefs for appProducts "Buy/Sell Crypto" item and landingCards "Buy and Sell" card to new hash-based route format with query parameters

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Verify URL format consistency between both updated links
  • Confirm query parameters and utm tracking are correctly positioned in the new route structure
  • Validate that the hash-based routing matches the intended destination in the app

Poem

🐰 A link was broken, oh what a plight,
But our swift refactoring set things right,
From queries to hashes, the route now flows,
Buy crypto with ease—off the bunny goes! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: buy/sell link" directly and accurately reflects the main change in the changeset. The PR updates the buy/sell navigation links to use the correct hash-based route format instead of legacy query-based paths. The title is concise, clear, and specific enough that a team member reviewing the commit history would immediately understand this is about fixing a buy/sell link issue. While it doesn't include implementation details like "UTM params" or "route format," that level of specificity is not required for an effective title and would make it unnecessarily verbose.
Linked Issues Check ✅ Passed The PR directly addresses the requirement from issue #10933 by updating the buy/sell links to properly navigate to app.shapeshift.com with the buy-crypto route. The changes convert the links from legacy query-based path format to hash-based routing, shifting from /?utm_source=...#/buy-crypto to /#/buy-crypto?utm_source=.... This fix should resolve the 404 error mentioned in the issue while preserving all UTM parameters for campaign tracking. The acceptance criteria is fully met: the buy/sell links now correctly point to the buy/sell feature in app.shapeshift.com using the proper URL format.
Out of Scope Changes Check ✅ Passed All changes in this PR are directly scoped to fixing the buy/sell link issue. Only one file was modified (app/[lang]/_utils/constants.tsx), and the changes are limited to updating two specific external link references to use the correct route format. No unrelated functionality, refactoring, or extraneous code was introduced. The modifications are tightly focused on addressing the specific problem described in issue #10933 without introducing any scope creep.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-utm-links

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 664bd75 and 05c2d77.

📒 Files selected for processing (1)
  • app/[lang]/_utils/constants.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-20T22:37:17.653Z
Learnt from: thesmithdao
PR: shapeshift/website-frontend#58
File: app/[lang]/_utils/constants.tsx:877-879
Timestamp: 2025-08-20T22:37:17.653Z
Learning: In the ShapeShift website frontend, redirect entries in next.config.ts are kept for SEO purposes even when partner logos are removed from carouselLogos in constants.tsx. This preserves search rankings and link equity from legacy integrations while removing them from active promotion.

Applied to files:

  • app/[lang]/_utils/constants.tsx
🔇 Additional comments (1)
app/[lang]/_utils/constants.tsx (1)

419-423: Consistent URL fix applied.

The same URL structure correction is applied here with appropriate UTM tracking parameters for the main page entry point (utm_source=mainpage), maintaining consistency with the menu link fix at line 308.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Buy/Sell link on shapeshift.com borked

2 participants