diff --git a/src/admin/insights/AdminAppInsightsClient.tsx b/src/admin/insights/AdminAppInsightsClient.tsx index 5925a13a..7f613a9b 100644 --- a/src/admin/insights/AdminAppInsightsClient.tsx +++ b/src/admin/insights/AdminAppInsightsClient.tsx @@ -53,6 +53,20 @@ const renderLabeledEnvVar = (label: string, envVar: string, value = '1') => ; +const renderHighlightText = ( + text: string, + color: 'blue' | 'yellow' = 'blue', +) => + + {text} + ; + export default function AdminAppInsightsClient({ codeMeta, insights, @@ -140,17 +154,10 @@ export default function AdminAppInsightsClient({ content={<> This fork is {' '} - - {codeMeta?.behindBy ?? DEBUG_BEHIND_BY} - {' '} - {(codeMeta?.behindBy ?? DEBUG_BEHIND_BY) === 1 - ? 'commit' - : 'commits'} - + {renderHighlightText( + pluralize(codeMeta?.behindBy ?? DEBUG_BEHIND_BY, 'commit'), + 'blue', + )} {' '} behind } @@ -222,7 +229,10 @@ export default function AdminAppInsightsClient({ size={17} className="translate-x-[0.5px] text-amber-600" />} - content="AI enabled without rate limiting" + content={renderHighlightText( + 'AI enabled without rate limiting', + 'yellow', + )} expandContent={<> Create Vercel KV store and link to this project in order prevent abuse by to enabling rate limiting. @@ -311,8 +321,11 @@ export default function AdminAppInsightsClient({ size={19} className="translate-y-[-2px] text-amber-600" />} - // eslint-disable-next-line max-len - content={pluralize(photosCountOutdated || DEBUG_PHOTOS_COUNT_OUTDATED, 'outdated photo')} + content={renderHighlightText( + // eslint-disable-next-line max-len + pluralize(photosCountOutdated || DEBUG_PHOTOS_COUNT_OUTDATED, 'outdated photo'), + 'yellow', + )} expandPath={PATH_ADMIN_OUTDATED} />}