import { useEffect, useMemo } from 'react'; import { keyframes } from '@emotion/react'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; import { Rambi } from '../mascot/Rambi'; import { playIncorrectSound } from '../../utils/sounds'; const slideUp = keyframes` from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } `; const encouragePhrases = [ 'Kaya mo yan!', 'Subukan ulit!', 'Okay lang!', 'Halos tama!', 'Matuto tayo!', 'Hindi bale!', ]; interface IncorrectBannerProps { correctAnswer: string; onContinue: () => void; } export function IncorrectBanner({ correctAnswer, onContinue }: IncorrectBannerProps) { const phrase = useMemo( () => encouragePhrases[Math.floor(Math.random() * encouragePhrases.length)], [], ); useEffect(() => { playIncorrectSound(); }, []); return ( {phrase} Correct answer: {correctAnswer} ); }