File size: 1,061 Bytes
6864389 aeb9637 35af7d4 6864389 35af7d4 6864389 35af7d4 6864389 |
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 |
import { Button } from "@/components/ui/button";
import { useState } from "react";
import { useTranslation } from "@/hooks/useTranslation";
interface ActionButtonsProps {
isCorrect: boolean;
onNextRound: () => void;
onPlayAgain: () => void;
currentScore: number;
avgWordsPerRound: number;
sessionId: string;
currentTheme: string;
onScoreSubmitted?: () => void;
onShowHighScores: () => void;
}
export const ActionButtons = ({
isCorrect,
onNextRound,
onPlayAgain,
onShowHighScores,
}: ActionButtonsProps) => {
const t = useTranslation();
return (
<div className="flex justify-center gap-4">
{isCorrect ? (
<Button onClick={onNextRound} className="text-white">{t.game.nextRound} ⏎</Button>
) : (
<>
<Button onClick={onPlayAgain} className="text-white">
{t.game.playAgain} ⏎
</Button>
<Button onClick={onShowHighScores} variant="secondary" className="text-white">
{t.game.saveScore}
</Button>
</>
)}
</div>
);
}; |