Repository navigation
feat(footer): use US Terms of Service and Privacy Policy for US users - #1307
Merged
Merged
Conversation
The site footer and the docs page footer always linked to the SG support pages. For US users (same isUSUser() rule as pricing) they now link to the Longbridge US PDFs, defined once as US_LEGAL_LINKS in @longbridge/openapi-utils. DocFooter.astro is rendered statically, so the two links carry a data-legal marker and a small client script swaps their href on astro:page-load when the visitor is a US user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
twosugar
force-pushed
the
feat/us-footer-legal-links
branch
from
October 26, 2026 07:43
9831404 to
93dbf0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The site footer (
Footer.tsx) and the docs page footer (DocFooter.astro) always link Terms of Service / Privacy Policy to the SG support pages, including for Longbridge US users.Change
For US users — same
isUSUser()rule as pricing (#1306: logged in → USapp_id; elseregioncookie; elsex-ip-regionfrom/api/_ping) — the two links point to the Longbridge US PDFs:Both URLs are defined once as
US_LEGAL_LINKSin@longbridge/openapi-utils.Footer.tsx(hydrated island): picks the href fromisUSUser().DocFooter.astro(static): the two links carrydata-legal="terms|privacy"; a small client script swaps the href onastro:page-loadwhen the visitor is a US user.Non-US users keep the current SG links.
Verification (local dev)
/)/docs)region=USregion=hklongbridge.com/sg/support/...(unchanged)Both PDF URLs return 200
application/pdf. oxlint clean on the changed files.The matching change for the dashboard / authorize pages is in
longbridge/developers-website-private.🤖 Generated with Claude Code