This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Add API Terms of Service page - #2735
Merged
Merged
Conversation
- Create ApiTermsOfService component with legal terms from Google Doc - Add routing as subpage under /api/terms - Link from API documentation page - Adapt governing law based on country (UK vs US jurisdiction) - Fixes #2734
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive API Terms of Service page to the PolicyEngine application, making legal terms available for API users. The implementation follows existing patterns from other legal pages and includes jurisdiction-aware content that adapts based on the user's country.
- Creates a new dedicated page for API Terms of Service accessible via
/{countryId}/api/terms - Implements jurisdiction-aware governing law that adapts based on country (US/UK)
- Adds a link from the API documentation page to the new terms page
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/pages/learn/ApiTermsOfService.jsx |
New component containing comprehensive API terms with jurisdiction-aware content |
src/pages/learn/APIGeneralContent.jsx |
Adds link to Terms of Service from API documentation page |
src/PolicyEngine.jsx |
Sets up nested routing structure for API pages with terms as subpage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Change default jurisdiction from District of Columbia to United States - Add dedicated getCourtLocation function for cleaner logic - Make jurisdiction handling more extensible for future countries
Contributor
Author
- Create api-terms.md with the full terms content - Update component to render markdown with react-markdown - Use placeholders for jurisdiction-specific content - Much cleaner and more maintainable than HTML
- Component focuses on fetching and processing the markdown - All content lives in api-terms.md file - No more duplicate content to maintain
- Remove separate api-terms.md file (CRA doesn't support importing .md files) - Embed content as template string in the component - Still renders as markdown with ReactMarkdown - Fixes build failure
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
/{countryId}/api/terms(e.g.,/us/api/terms,/uk/api/terms)Changes
ApiTermsOfService.jsxcomponent with the full legal terms/apiTesting
Fixes #2734