From e1535bf71ec1026d78067a99cf58563f1302c83a Mon Sep 17 00:00:00 2001 From: ElishaKay Date: Sat, 21 Dec 2024 21:57:39 +0200 Subject: [PATCH] hide download logs button for mutli_agents report --- frontend/nextjs/app/page.tsx | 1 + .../nextjs/components/ResearchBlocks/AccessReport.tsx | 10 ++++++---- frontend/nextjs/components/ResearchResults.tsx | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/nextjs/app/page.tsx b/frontend/nextjs/app/page.tsx index e5bd5fd5e..2cc301af9 100644 --- a/frontend/nextjs/app/page.tsx +++ b/frontend/nextjs/app/page.tsx @@ -257,6 +257,7 @@ export default function Home() { orderedData={orderedData} answer={answer} allLogs={allLogs} + chatBoxSettings={chatBoxSettings} handleClickSuggestion={handleClickSuggestion} /> diff --git a/frontend/nextjs/components/ResearchBlocks/AccessReport.tsx b/frontend/nextjs/components/ResearchBlocks/AccessReport.tsx index 21996cce3..f35a3a159 100644 --- a/frontend/nextjs/components/ResearchBlocks/AccessReport.tsx +++ b/frontend/nextjs/components/ResearchBlocks/AccessReport.tsx @@ -6,11 +6,13 @@ interface AccessReportProps { pdf?: string; docx?: string; json?: string; - }; + }; + chatBoxSettings: any; + logs?: any[]; report: string; } -const AccessReport: React.FC = ({ accessData, report }) => { +const AccessReport: React.FC = ({ accessData, chatBoxSettings, report }) => { const host = getHost(); const getReportLink = (dataType: 'pdf' | 'docx' | 'json'): string => { @@ -39,13 +41,13 @@ const AccessReport: React.FC = ({ accessData, report }) => { rel="noopener noreferrer"> Download DocX - Download Logs - + } ); }; diff --git a/frontend/nextjs/components/ResearchResults.tsx b/frontend/nextjs/components/ResearchResults.tsx index 218ad661b..7cc1c18b2 100644 --- a/frontend/nextjs/components/ResearchResults.tsx +++ b/frontend/nextjs/components/ResearchResults.tsx @@ -13,6 +13,7 @@ interface ResearchResultsProps { orderedData: Data[]; answer: string; allLogs: any[]; + chatBoxSettings: any; handleClickSuggestion: (value: string) => void; } @@ -20,6 +21,7 @@ export const ResearchResults: React.FC = ({ orderedData, answer, allLogs, + chatBoxSettings, handleClickSuggestion }) => { const groupedData = preprocessOrderedData(orderedData); @@ -72,7 +74,7 @@ export const ResearchResults: React.FC = ({ {sourceComponents} {imageComponents} {finalReport && } - {pathData && } + {pathData && } {chatComponents} );