Skip to content

Commit

Permalink
feat: previous chat didnt display multiple admin tags
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSlain committed Nov 27, 2024
1 parent 1097337 commit 4644e13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/useGetArchive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/components/Meeting/MeetingOutputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ export const MeetingOutputs = memo(function MeetingOutputs({
administrations: [],
themes: [],
})

useEffect(() => {
if (chatId !== undefined && archiveData && archiveData.length > 0) {
if (Array.isArray(archiveData)) {
dispatch({ type: 'ADD_HISTORY_BATCH', items: archiveData })
}
setContext({
themes: archiveData[0].themes,
administrations: [archiveData[0]?.operators],
administrations: archiveData[0]?.operators,
})
}
}, [chatId, archiveData, dispatch])
Expand Down

0 comments on commit 4644e13

Please sign in to comment.