Summary
There is currently no way to share a specific search with someone. This issue encodes the current search inputs (source, destination, amount, direction, and network) as URL query parameters so a user can copy the URL from their browser and share it. Opening the URL pre-fills the form and runs the search automatically.
Task
- On search submission, push the search parameters to the URL using
useRouter and useSearchParams from next/navigation.
- On page load, read any present query parameters and use them to pre-populate the form state and trigger a search.
- Handle malformed or partial query parameters gracefully by falling back to defaults.
- Do not push a new history entry on polling re-fetches, only on user-initiated searches.
Acceptance Criteria
Files in Scope
src/app/page.tsx
src/components/path-form.tsx
src/hooks/use-paths.ts
Complexity
Summary
There is currently no way to share a specific search with someone. This issue encodes the current search inputs (source, destination, amount, direction, and network) as URL query parameters so a user can copy the URL from their browser and share it. Opening the URL pre-fills the form and runs the search automatically.
Task
useRouteranduseSearchParamsfromnext/navigation.Acceptance Criteria
Files in Scope
src/app/page.tsxsrc/components/path-form.tsxsrc/hooks/use-paths.tsComplexity