diff --git a/echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx b/echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx index f4b526d1..4f035bc3 100644 --- a/echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx +++ b/echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx @@ -39,8 +39,17 @@ export const VerifiedArtefactsSection = ({ queryKey: ["verify", "conversation_artifacts", conversationId], }); + if (isLoading) { + return ( + + + + + ); + } + // Don't show the section if there are no artefacts - if (!isLoading && (!artefacts || artefacts.length === 0)) { + if (!artefacts || artefacts.length === 0) { return null; } @@ -60,44 +69,34 @@ export const VerifiedArtefactsSection = ({ - {isLoading && ( - - - - - )} - - {!isLoading && artefacts && artefacts.length > 0 && ( - - {artefacts.map((artefact) => { - const formattedDate = formatArtefactTime(artefact.approved_at); + + {artefacts.map((artefact) => { + const formattedDate = formatArtefactTime(artefact.approved_at); - return ( - - - - - {/* {artefact.title ?? artefact.key} */} - {artefact.key || ""} - {formattedDate && ( - - - Approved - {" "} - {formattedDate} - - )} - - - - - - - - ); - })} - - )} + return ( + + + + + {artefact.key || ""} + {formattedDate && ( + + + Approved + {" "} + {formattedDate} + + )} + + + + + + + + ); + })} + ); };