From 6890f54cb5c2e9b1a6a87301be933731987aea0a Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 25 Oct 2023 10:39:49 -0400 Subject: [PATCH] fix: use multiple analytics card messages The previous use of `adminPortal.analyticsCardText`was fully dynamic, and resulted in "Messages must be statically evaluate-able for extraction." errors when running `make extract_translations`. This splits the message up into separately translatable messages, and updates the logic for displaying them accordingly. --- src/components/Admin/AIAnalyticsSummary.jsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Admin/AIAnalyticsSummary.jsx b/src/components/Admin/AIAnalyticsSummary.jsx index 020e18df1a..4266c8e164 100644 --- a/src/components/Admin/AIAnalyticsSummary.jsx +++ b/src/components/Admin/AIAnalyticsSummary.jsx @@ -21,14 +21,20 @@ const AnalyticsDetailCard = ({

+ {error && ( + )} + {!error && !data && ( + + )} + {data}