From f9405e9ad91327f51c710ee4e06878e301f03ec8 Mon Sep 17 00:00:00 2001 From: "ryan.li" Date: Mon, 12 May 2025 23:38:44 +0800 Subject: [PATCH 1/2] Remove show answer button --- frontend/src/components/practice/PracticeControls.tsx | 10 ++-------- .../_layout/collections/$collectionId/practice.tsx | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/practice/PracticeControls.tsx b/frontend/src/components/practice/PracticeControls.tsx index 754861f..d4c5f80 100644 --- a/frontend/src/components/practice/PracticeControls.tsx +++ b/frontend/src/components/practice/PracticeControls.tsx @@ -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 ( - - {t('general.actions.showAnswer')} - - ) + return } return ( diff --git a/frontend/src/routes/_layout/collections/$collectionId/practice.tsx b/frontend/src/routes/_layout/collections/$collectionId/practice.tsx index 48ecec5..a7ec2e4 100644 --- a/frontend/src/routes/_layout/collections/$collectionId/practice.tsx +++ b/frontend/src/routes/_layout/collections/$collectionId/practice.tsx @@ -46,7 +46,7 @@ function PracticeComponent() { isFlipped={isFlipped} onFlip={handleFlip} /> - + ) } From 662f03464bd49bfd1fc48f903e73d619fb96558a Mon Sep 17 00:00:00 2001 From: "ryan.li" Date: Wed, 21 May 2025 20:27:39 +0800 Subject: [PATCH 2/2] Remove corresponding keys --- frontend/public/locales/en/translation.json | 1 - frontend/public/locales/es/translation.json | 1 - frontend/public/locales/nl/translation.json | 1 - 3 files changed, 3 deletions(-) diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index 304e480..cd60056 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -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", diff --git a/frontend/public/locales/es/translation.json b/frontend/public/locales/es/translation.json index 62f764e..4b06233 100644 --- a/frontend/public/locales/es/translation.json +++ b/frontend/public/locales/es/translation.json @@ -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", diff --git a/frontend/public/locales/nl/translation.json b/frontend/public/locales/nl/translation.json index 39a694c..fbbaf2e 100644 --- a/frontend/public/locales/nl/translation.json +++ b/frontend/public/locales/nl/translation.json @@ -106,7 +106,6 @@ "practiceAgain": "Opnieuw Oefenen", "practiceCards": "Kaarten Oefenen", "save": "Opslaan", - "showAnswer": "Toon Antwoord", "signUp": "Aanmelden", "startPracticing": "Begin met Oefenen", "toggleColorMode": "Kleurmodus Wisselen",