Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
ertrzyiks committed Jan 4, 2025
1 parent aaba2f3 commit 47f5fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function useSearch({ query }: { query: string }) {
return useQuery({
queryKey: ["search", query],
enabled: query !== "",
keepPreviousData: query !== "",
placeholderData: query !== "" ? [] : undefined,
queryFn: async () => {
const res = await fetch("/api/search?query=" + encodeURIComponent(query));
return res.json();
Expand Down

0 comments on commit 47f5fd2

Please sign in to comment.