Add metrics display to post-choice screen

Implement the metrics component in the post-choice screen to visualize how the metrics change based on the deployed strategy. This enhancement allows users to see the impact of their choices in real-time.
[skip gpt_engineer]
Этот коммит содержится в:
gpt-engineer-app[bot] 2025-01-14 15:41:18 +00:00
родитель e81392e3be
Коммит 3621e3d87a

Просмотреть файл

@ -33,6 +33,7 @@ import { Footer } from '../components/Footer';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { LanguageSwitcher } from '@/components/LanguageSwitcher'; import { LanguageSwitcher } from '@/components/LanguageSwitcher';
import '@/i18n/config'; import '@/i18n/config';
import { MetricsDisplay } from "@/components/game/MetricsDisplay";
const Index = () => { const Index = () => {
const { t } = useTranslation(); const { t } = useTranslation();
@ -359,6 +360,10 @@ const Index = () => {
</div> </div>
</CardHeader> </CardHeader>
<CardContent className="space-y-6"> <CardContent className="space-y-6">
<div className="bg-gray-800/30 p-6 rounded-md border border-gray-700">
<MetricsDisplay choices={previousChoices} className="pl-0" />
</div>
<div> <div>
<h3 className="text-yellow-500 font-semibold mb-3">{t('analysis.keyInsights')}</h3> <h3 className="text-yellow-500 font-semibold mb-3">{t('analysis.keyInsights')}</h3>
<ul className="space-y-2"> <ul className="space-y-2">
@ -485,7 +490,7 @@ const Index = () => {
)} )}
{selectedChoice.weakenedBy?.some(choice => previousChoices.includes(choice)) && ( {selectedChoice.weakenedBy?.some(choice => previousChoices.includes(choice)) && (
<div className="flex items-start gap-2"> <div className="flex items-start gap-2">
<span className="text-red-400"><EFBFBD><EFBFBD><EFBFBD></span> <span className="text-red-400"></span>
<div> <div>
<span className="text-red-400">Weakened</span> <span className="text-red-400">Weakened</span>
<span className="text-gray-400"> by: </span> <span className="text-gray-400"> by: </span>