Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"practiceAgain": "Practice Again",
"practiceCards": "Practice Cards",
"save": "Save",
"showAnswer": "Show Answer",
"signUp": "Sign Up",
"startPracticing": "Start Practicing",
"toggleColorMode": "Toggle color mode",
Expand Down
1 change: 0 additions & 1 deletion frontend/public/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"practiceAgain": "Practicar de Nuevo",
"practiceCards": "Practicar Tarjetas",
"save": "Guardar",
"showAnswer": "Mostrar Respuesta",
"signUp": "Registrarse",
"startPracticing": "Comenzar a Practicar",
"toggleColorMode": "Cambiar modo de color",
Expand Down
1 change: 0 additions & 1 deletion frontend/public/locales/nl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"practiceAgain": "Opnieuw Oefenen",
"practiceCards": "Kaarten Oefenen",
"save": "Opslaan",
"showAnswer": "Toon Antwoord",
"signUp": "Aanmelden",
"startPracticing": "Begin met Oefenen",
"toggleColorMode": "Kleurmodus Wisselen",
Expand Down
10 changes: 2 additions & 8 deletions frontend/src/components/practice/PracticeControls.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { Flex, HStack, IconButton } from '@chakra-ui/react'
import { useTranslation } from 'react-i18next'
import { FaCheck, FaTimes } from 'react-icons/fa'
import { BlueButton } from '../commonUI/Button'

interface PracticeControlsProps {
isFlipped: boolean
onFlip: () => void
onAnswer: (correct: boolean) => void
}

function PracticeControls({ isFlipped, onFlip, onAnswer }: PracticeControlsProps) {
function PracticeControls({ isFlipped, onAnswer }: PracticeControlsProps) {
const { t } = useTranslation()
if (!isFlipped) {
return (
<Flex height="5rem" justifyContent="center" alignItems="center">
<BlueButton onClick={onFlip}>{t('general.actions.showAnswer')}</BlueButton>
</Flex>
)
return <Flex height="5rem" justifyContent="center" alignItems="center" />
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function PracticeComponent() {
isFlipped={isFlipped}
onFlip={handleFlip}
/>
<PracticeControls isFlipped={isFlipped} onFlip={handleFlip} onAnswer={handleAnswer} />
<PracticeControls isFlipped={isFlipped} onAnswer={handleAnswer} />
</VStack>
)
}