Improve website settings and special-item pick UX.
Tighten sitemap/settings controls, debounce product search to 10 results, keep catalog-only specials visible after add, and use frosted glass on link/category modals. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
a39aef0c8c
commit
77080a7a4b
@@ -91,9 +91,22 @@ function businessPath(suffix = '') {
|
||||
return `/businesses/${businessId}/store-items${suffix}`
|
||||
}
|
||||
|
||||
export async function listStoreItems(page = 1, pageSize = 20, signal?: AbortSignal) {
|
||||
export async function listStoreItems(
|
||||
page = 1,
|
||||
pageSize = 20,
|
||||
signal?: AbortSignal,
|
||||
filters?: { name?: string },
|
||||
) {
|
||||
const params = new URLSearchParams({
|
||||
page: String(page),
|
||||
pageSize: String(pageSize),
|
||||
})
|
||||
if (filters?.name?.trim()) {
|
||||
params.set('name', filters.name.trim())
|
||||
}
|
||||
|
||||
return apiRequest<StoreItemsListResponse>(
|
||||
`${businessPath()}?page=${page}&pageSize=${pageSize}`,
|
||||
`${businessPath()}?${params.toString()}`,
|
||||
{ auth: true, signal },
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user