File size: 634 Bytes
5cd06ed
 
6864389
 
 
 
 
 
5cd06ed
 
6864389
5cd06ed
 
 
 
 
 
 
 
 
6864389
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { useTranslation } from "@/hooks/useTranslation";

interface GuessResultProps {
  aiGuess: string;
  isCorrect: boolean;
}

export const GuessResult = ({ aiGuess, isCorrect }: GuessResultProps) => {
  const t = useTranslation();
  
  return (
    <div className="space-y-2">
      <p className="text-sm text-gray-600">
        {t.guess.aiGuessedDescription}
      </p> 
      <div className={`rounded-lg ${isCorrect ? 'bg-green-50' : 'bg-red-50'}`}>
        <p className={`p-4 text-2xl font-bold tracking-wider ${isCorrect ? 'text-green-600' : 'text-red-600'}`}>
          {aiGuess}
        </p>
      </div>
    </div>
  );
};