-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue #1458]: Setup query param management - writing to the URL part 1 #1462
Conversation
cc @andycochran |
{/* TODO: href here needs to be set to: | ||
dev/staging: https://grants.gov/search-results-detail/<opportunity_id> | ||
local/prod: https://grants.gov/search-results-detail/<opportunity_id> | ||
*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note to set the anchor link to the actual grant/opportunity - it differs for each environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, this is the same URL twice. eg. https://grants.gov/search-results-detail/<opportunity_id>
@@ -20,20 +21,25 @@ export function SearchForm({ initialSearchResults }: SearchFormProps) { | |||
initialSearchResults, | |||
); | |||
|
|||
const formRef = useRef(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref
here allows us to submit from non button inputs (which are basically most our inputs since we just have one submit/search button in the SearchBar
component
const [mounted, setMounted] = useState(false); | ||
const { updateQueryParams } = useSearchParamUpdater(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we get to remove the eslint disable statement in the part 2 pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber stamp approval since I'm not familiar with frontend code
Merging this PR is irrelevant since the pagination PR was branched off this and merged: #1480 |
Summary
Fixes #1458
Time to review: 5 min
Changes proposed
Context
status=forecasted,closed,archived
This is just part 1 - I will need to come back for part 2 and set it to:
Demo
Screen.Recording.2024-03-12.at.4.35.22.PM.mov