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 0603162 commit f53b736
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 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
1 change: 0 additions & 1 deletion src/components/Root/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { handleSignout } from '@utils/manageConnexion'
import { signoutUrl } from '@api'

function Header({ username, setUserAuth, userAuth }) {
console.log('userauth', userAuth)
return (
<header role="banner" className="fr-header">
<div className="fr-header__body">
Expand Down

0 comments on commit f53b736

Please sign in to comment.