From 066cab9da83d8c13133b81e29440fbf72903153c Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 8 Dec 2024 14:02:29 +0100 Subject: [PATCH] Include slug namespace in the tables arrangements fetch endpoint --- app/ui/arrangements/arrangement.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/ui/arrangements/arrangement.tsx b/app/ui/arrangements/arrangement.tsx index 749c577..9e96b34 100644 --- a/app/ui/arrangements/arrangement.tsx +++ b/app/ui/arrangements/arrangement.tsx @@ -6,13 +6,14 @@ import React, { useState } from 'react'; import { TableArrangement, Guest } from '@/app/lib/definitions'; import { lusitana } from '@/app/ui/fonts'; import { Table } from '@/app/ui/components/table'; +import { getSlug } from '@/app/lib/utils'; export default function Arrangement({ id }: { id: string }) { const [tables, setTables] = useState>([]); function loadTables() { - fetch(`/api/tables_arrangements/${id}`) + fetch(`/api/${getSlug()}/tables_arrangements/${id}`) .then((response) => response.json()) .then((data) => { setTables(data.map((record: any) => {