File size: 1,271 Bytes
8725cc4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { Button } from "@/components/ui/button";
import { motion } from "framer-motion";

interface WordDisplayProps {
  currentWord: string;
  successfulRounds: number;
  onContinue: () => void;
}

export const WordDisplay = ({ currentWord, successfulRounds, onContinue }: WordDisplayProps) => {
  return (
    <motion.div
      initial={{ opacity: 0 }}
      animate={{ opacity: 1 }}
      className="text-center"
    >
      <h2 className="mb-4 text-2xl font-semibold text-gray-900">Your Word</h2>
      <div className="mb-4 rounded-lg bg-secondary/10 p-6">
        <p className="text-4xl font-bold tracking-wider text-secondary">
          {currentWord}
        </p>
      </div>
      {successfulRounds > 0 && (
        <p className="mb-4 text-green-600">
          Successful rounds: {successfulRounds}
        </p>
      )}
      <p className="mb-8 text-gray-600">
        You'll take turns with AI to create a sentence that describes this word.
      </p>
      <p className="mb-8 text-gray-600">
        Click the "Make AI Guess" button to see if another AI can guess it!
      </p>
      <Button
        onClick={onContinue}
        className="w-full bg-primary text-lg hover:bg-primary/90"
      >
        Continue ⏎
      </Button>
    </motion.div>
  );
};