diff --git a/frontend/src/pages/Flashcards.jsx b/frontend/src/pages/Flashcards.jsx new file mode 100644 index 0000000..cde6c8d --- /dev/null +++ b/frontend/src/pages/Flashcards.jsx @@ -0,0 +1,39 @@ +import {useState} from 'react' +import {Link, useLocation} from 'react-router-dom' + +function Flashcards(){ + const location =useLocation() + const savedWords = location.state?.savedWords || [] + const sourceLanguage = location.state?.sourceLanguage + const [currentIndex, setCurrentIndex] = useState(0) + const [isFlipped, setIsFlipped] = useState(false) + + + if(savedWords.length === 0){ + return ( +
+ Save words during a lesson before starting flashcard review. +
+ + Choose a song + +