From 6fe340947042e12a538b113793336d09d54f2ec8 Mon Sep 17 00:00:00 2001 From: Fufeck Date: Thu, 18 Apr 2024 16:16:32 +0200 Subject: [PATCH] delete: route current revision moissonneur --- lib/api-moissonneur-bal.ts | 15 --------------- pages/moissonneur-bal.tsx | 11 ++++++++--- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/lib/api-moissonneur-bal.ts b/lib/api-moissonneur-bal.ts index 9eb07bd..a6034e9 100644 --- a/lib/api-moissonneur-bal.ts +++ b/lib/api-moissonneur-bal.ts @@ -150,21 +150,6 @@ export async function getSourceHarvests( return result.json(); } -export async function getSourceCurrentRevisions( - id: string -): Promise { - const result = await fetch( - `${NEXT_PUBLIC_API_MOISSONEUR_BAL}/sources/${id}/current-revisions` - ); - - if (!result.ok) { - const error = await result.json(); - throw new Error(error.message); - } - - return result.json(); -} - export async function getSourceLastUpdatedRevisions( id: string ): Promise { diff --git a/pages/moissonneur-bal.tsx b/pages/moissonneur-bal.tsx index 7204dfd..7ea28a3 100644 --- a/pages/moissonneur-bal.tsx +++ b/pages/moissonneur-bal.tsx @@ -40,17 +40,17 @@ const MoissoneurBAL = ({ selectedTabId={selectedTabId} onTabChange={(e) => setSelectedTabId(e)} tabs={[ - { tabId: "sources", label: "Sources" }, { tabId: "organizations", label: "Organisations" }, + { tabId: "sources", label: "Sources" }, ]} > - {selectedTabId === "sources" && } {selectedTabId === "organizations" && ( )} + {selectedTabId === "sources" && } ); @@ -64,7 +64,12 @@ export async function getServerSideProps({ query }) { await getPartenairesDeLaCharte(); return { - props: { sources, organizations, partenaires, page: page || "sources" }, + props: { + sources, + organizations, + partenaires, + page: page || "organizations", + }, }; }