Apply limit and filter to the tables arrangements search API

This commit is contained in:
Manuel Bustillo 2025-09-21 19:41:36 +02:00
parent 750f6f4271
commit 702bb52d72
No known key found for this signature in database
GPG Key ID: A74BD9E346A80DDC

View File

@ -4,7 +4,7 @@ import { TableArrangement } from '@/app/lib/definitions';
import { getSlug } from '../lib/utils';
export function loadTableSimulations(onLoad?: (tableSimulations: TableArrangement[]) => void) {
fetch(`/api/${getSlug()}/tables_arrangements`)
fetch(`/api/${getSlug()}/tables_arrangements?limit=3&status=completed`)
.then((response) => response.json())
.then((data) => {
onLoad && onLoad(data.map((record: any) => {