Apply limit and filter to the tables arrangements search API
This commit is contained in:
parent
750f6f4271
commit
702bb52d72
@ -4,7 +4,7 @@ import { TableArrangement } from '@/app/lib/definitions';
|
|||||||
import { getSlug } from '../lib/utils';
|
import { getSlug } from '../lib/utils';
|
||||||
|
|
||||||
export function loadTableSimulations(onLoad?: (tableSimulations: TableArrangement[]) => void) {
|
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((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
onLoad && onLoad(data.map((record: any) => {
|
onLoad && onLoad(data.map((record: any) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user