feat(admin): add search with submit and safe-area layout
Add submit-based search to admin books page and switch borrows search from debounced to submit-based for consistency. Update layout headers and nav bars to respect mobile safe-area insets via CSS custom properties.
This commit is contained in:
@@ -17,6 +17,7 @@ export function useAdminSearchBooks(query: string) {
|
||||
queryKey: ["admin", "books", "search", query],
|
||||
queryFn: () => searchBook(query),
|
||||
enabled: query.length > 0,
|
||||
retry: false,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -89,6 +90,7 @@ export function useSearchBorrows(query: string) {
|
||||
queryKey: ["admin", "borrows", "search", query],
|
||||
queryFn: () => searchBorrows(query),
|
||||
enabled: query.length > 0,
|
||||
retry: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export function useSearchBooks(query: string) {
|
||||
queryKey: ["books", "search", query],
|
||||
queryFn: () => searchBook(query),
|
||||
enabled: query.length > 0,
|
||||
retry: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ export function useSearchMyBorrows(query: string) {
|
||||
queryKey: ["myBorrows", "search", query],
|
||||
queryFn: () => searchMyBorrows(query),
|
||||
enabled: query.length > 0,
|
||||
retry: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user