Skip to content

Commit 2349c94

Browse files
committed
fix(web): add missing query parameter to autocomplete API URL
The OpenAlex autocomplete API URL was malformed with `?=` instead of `?q=`, causing the autocomplete dropdown to never show suggestions. This fix adds the required `q` query parameter name. Before: https://api.openalex.org/autocomplete?=${query} After: https://api.openalex.org/autocomplete?q=${query}
1 parent c4e7375 commit 2349c94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/src/components/layout/HeaderSearchInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const HeaderSearchInput = () => {
126126

127127
// OpenAlex API for autocomplete suggestions
128128
const response = await fetch(
129-
`https://api.openalex.org/autocomplete?=${encodeURIComponent(searchQuery)}`,
129+
`https://api.openalex.org/autocomplete?q=${encodeURIComponent(searchQuery)}`,
130130
{
131131
signal: abortController.signal,
132132
headers: {

0 commit comments

Comments
 (0)