Made "County name" a searchable component on US site#2679
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
||
| export default function VariableSearch(props) { | ||
| const { metadata, callback } = props; | ||
| const countryId = window.location.pathname.split("/")[1]; |
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", |
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.
|
Thank you for this contribution. Closing as part of the If this is still relevant, please consider re-opening it against |
Description
Fixes #2604
Screenshots