limit
Some checks are pending
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
8053fda0ec
commit
b86e840cc6
3 changed files with 12 additions and 7 deletions
|
|
@ -50,12 +50,17 @@ export function BulkCardEditor({ images, onComplete, onCancel }: BulkCardEditorP
|
|||
// Load packs
|
||||
useEffect(() => {
|
||||
packsApi
|
||||
.getPacks({ page: 1, limit: 1000, search: '' })
|
||||
.getPacks({ page: 1, limit: 100, search: '' })
|
||||
.then((response) => {
|
||||
setPacksData(response.items.map((pack) => ({ id: pack.id, title: pack.title })))
|
||||
if (response && response.items) {
|
||||
setPacksData(response.items.map((pack) => ({ id: pack.id, title: pack.title })))
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((error) => {
|
||||
console.error('Failed to load packs:', error)
|
||||
toast.error('Failed to load packs')
|
||||
// Initialize with empty array so component doesn't crash
|
||||
setPacksData([])
|
||||
})
|
||||
}, [])
|
||||
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ export default function CardsPage() {
|
|||
|
||||
// Fetch packs for packId selection
|
||||
const { data: packsData } = useQuery({
|
||||
queryKey: ['packs', 1, 1000, ''],
|
||||
queryFn: () => packsApi.getPacks({ page: 1, limit: 1000, search: '' }),
|
||||
queryKey: ['packs', 1, 100, ''],
|
||||
queryFn: () => packsApi.getPacks({ page: 1, limit: 100, search: '' }),
|
||||
})
|
||||
|
||||
const openCreateDialog = () => {
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ export default function UsersPage() {
|
|||
|
||||
// Fetch packs for selection
|
||||
const { data: packsData } = useQuery({
|
||||
queryKey: ['packs', 1, 1000, ''],
|
||||
queryFn: () => packsApi.getPacks({ page: 1, limit: 1000, search: '', showDisabled: true }),
|
||||
queryKey: ['packs', 1, 100, ''],
|
||||
queryFn: () => packsApi.getPacks({ page: 1, limit: 100, search: '', showDisabled: true }),
|
||||
})
|
||||
|
||||
// Mutations
|
||||
|
|
|
|||
Loading…
Reference in a new issue