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
@@ -262,7 +262,7 @@ export function StoreSpecialsPage() {
|
||||
const existingIds = pickItemsTarget.items.map((item) =>
|
||||
fromProducts ? item.productId : item.id,
|
||||
)
|
||||
const nextIds = [...existingIds, ...ids]
|
||||
const nextIds = [...new Set([...existingIds, ...ids])]
|
||||
|
||||
setIsSaving(true)
|
||||
setError('')
|
||||
@@ -276,11 +276,10 @@ export function StoreSpecialsPage() {
|
||||
setPickItemsTarget(null)
|
||||
showToast(t('website.specialItems.toastAdded'), 'success')
|
||||
} catch (err) {
|
||||
if (err instanceof ApiError) {
|
||||
setError(err.message)
|
||||
} else {
|
||||
setError(t('website.specialItems.errorAdd'))
|
||||
}
|
||||
const message =
|
||||
err instanceof ApiError ? err.message : t('website.specialItems.errorAdd')
|
||||
setError(message)
|
||||
throw err instanceof Error ? err : new Error(message)
|
||||
} finally {
|
||||
setIsSaving(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user