fix: remove unsafe .replace() calls in AgenticReadinessTab

Removed .replace('/', '') calls on translation strings that could cause
runtime errors if t() returns unexpected values. Now displays perMonth
translation as-is.

This fixes the 'o is not a function' error in production build.

https://claude.ai/code/session_03272424-c661-4002-a75e-2f81579fdd6e
This commit is contained in:
Claude
2026-02-08 10:23:45 +00:00
parent 08a9ecb099
commit 98f42bfac6

View File

@@ -2429,7 +2429,7 @@ function TierQueueSection({
<div className="px-5 py-3 border-b flex items-center justify-between text-sm" style={{ backgroundColor: config.bgColor + '40' }}>
<div className="flex gap-4 flex-wrap">
<span className="text-gray-600">
{t('agenticReadiness.sections.volumeColon')} <strong className="text-gray-800">{totalVolume.toLocaleString()}</strong> {t('agenticReadiness.table.int')}/{t('agenticReadiness.table.perMonth').replace('/', '')}
{t('agenticReadiness.sections.volumeColon')} <strong className="text-gray-800">{totalVolume.toLocaleString()}</strong> {t('agenticReadiness.table.int')}{t('agenticReadiness.table.perMonth')}
</span>
<span className="text-gray-600">
{t('agenticReadiness.sections.costColon')} <strong className="text-gray-800">{formatCurrency(totalCost)}</strong>{t('agenticReadiness.table.perYear')}
@@ -2675,7 +2675,7 @@ function HumanOnlyByReasonSection({ drilldownData, redFlagConfigs, t }: { drilld
{/* Resumen */}
<div className="px-5 py-3 border-b bg-gray-50 flex items-center justify-between text-sm">
<span className="text-gray-600">
{t('agenticReadiness.humanOnlyReasons.volumeTotal')} <strong className="text-gray-800">{totalVolume.toLocaleString()}</strong> {t('agenticReadiness.table.int')}/{t('agenticReadiness.table.perMonth').replace('/', '')}
{t('agenticReadiness.humanOnlyReasons.volumeTotal')} <strong className="text-gray-800">{totalVolume.toLocaleString()}</strong> {t('agenticReadiness.table.int')}{t('agenticReadiness.table.perMonth')}
</span>
<span className="text-gray-500">
{t('agenticReadiness.summary.requiresIntervention')}