Made "County name" a searchable component on US site#2679
Open
v-lerie wants to merge 2 commits intoPolicyEngine:mainfrom
Open
Made "County name" a searchable component on US site#2679v-lerie wants to merge 2 commits intoPolicyEngine:mainfrom
v-lerie wants to merge 2 commits intoPolicyEngine:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
anth-volk
requested changes
Jul 24, 2025
|
|
||
| export default function VariableSearch(props) { | ||
| const { metadata, callback } = props; | ||
| const countryId = window.location.pathname.split("/")[1]; |
Collaborator
There was a problem hiding this comment.
issue, minor: If possible at this point in the code, use the useCountryId hook, which you'll find used in many other components, or pull the country ID from the metadata that you have passed down (I believe it's metadata.countryId).
| value: | ||
| countryId === "us" | ||
| ? "input.geography.countyName" | ||
| : "input.household.countyName", |
Collaborator
There was a problem hiding this comment.
issue, blocking: We don't want to push input.household.countyName outside of the US context, we just don't want to modify it at all if it's present for some reason
If we add it the way you do here, it'll show up on our UK and Canadian sites, where it's actually not an option.
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.
Description
Fixes #2604
Screenshots