From 4644e13ad436f6208569b176ddb1b14024711135 Mon Sep 17 00:00:00 2001 From: Joe Slain Date: Wed, 27 Nov 2024 15:14:41 +0100 Subject: [PATCH] feat: previous chat didnt display multiple admin tags --- src/api/useGetArchive.tsx | 2 +- src/components/Meeting/MeetingOutputs.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api/useGetArchive.tsx b/src/api/useGetArchive.tsx index 3f3efd4..5f18357 100644 --- a/src/api/useGetArchive.tsx +++ b/src/api/useGetArchive.tsx @@ -46,7 +46,7 @@ const fetchArchive = async (chatId: number) => { type ArchiveType = { chat_type: string - operators: string + operators: string[] themes: string[] id: number created_at: string diff --git a/src/components/Meeting/MeetingOutputs.tsx b/src/components/Meeting/MeetingOutputs.tsx index 777c226..a0b25ec 100644 --- a/src/components/Meeting/MeetingOutputs.tsx +++ b/src/components/Meeting/MeetingOutputs.tsx @@ -31,7 +31,6 @@ export const MeetingOutputs = memo(function MeetingOutputs({ administrations: [], themes: [], }) - useEffect(() => { if (chatId !== undefined && archiveData && archiveData.length > 0) { if (Array.isArray(archiveData)) { @@ -39,7 +38,7 @@ export const MeetingOutputs = memo(function MeetingOutputs({ } setContext({ themes: archiveData[0].themes, - administrations: [archiveData[0]?.operators], + administrations: archiveData[0]?.operators, }) } }, [chatId, archiveData, dispatch])