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:
@@ -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="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">
|
<div className="flex gap-4 flex-wrap">
|
||||||
<span className="text-gray-600">
|
<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>
|
||||||
<span className="text-gray-600">
|
<span className="text-gray-600">
|
||||||
{t('agenticReadiness.sections.costColon')} <strong className="text-gray-800">{formatCurrency(totalCost)}</strong>{t('agenticReadiness.table.perYear')}
|
{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 */}
|
{/* Resumen */}
|
||||||
<div className="px-5 py-3 border-b bg-gray-50 flex items-center justify-between text-sm">
|
<div className="px-5 py-3 border-b bg-gray-50 flex items-center justify-between text-sm">
|
||||||
<span className="text-gray-600">
|
<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>
|
||||||
<span className="text-gray-500">
|
<span className="text-gray-500">
|
||||||
{t('agenticReadiness.summary.requiresIntervention')}
|
{t('agenticReadiness.summary.requiresIntervention')}
|
||||||
|
|||||||
Reference in New Issue
Block a user