import React, { useEffect, useState } from 'react'; import { Progress } from 'antd'; function letterCount() { const element = document.getElementById('queryMessage') as HTMLInputElement | null; if (element) { const valueLength = element.value.length; const lengthElement = document.getElementById('letterLength'); if (lengthElement) { lengthElement.innerHTML = valueLength.toString(); } console.log(valueLength); } else { console.error("Element with id 'queryMessage' not found."); } } export default function Index() { const [percent, setPercent] = useState(0); const [secondsLeft, setSecondsLeft] = useState(30); useEffect(() => { const interval = setInterval(() => { setPercent((prevPercent) => { if (prevPercent >= 100) { clearInterval(interval); return 100; } return Math.round(prevPercent + (100 / 30)); // Round percentage }); setSecondsLeft((prevSeconds) => { if (prevSeconds <= 1) { clearInterval(interval); return 0; } return prevSeconds - 1; }); }, 1000); return () => clearInterval(interval); }, []); return ( <> ✨ Take an AI Generative Quiz Convert any text into an interactive quiz session ✕ Text to Use 0/2000 Trending Dr. Marie Montessori Life Journey 12 classmates have taken this quiz. Montessori Methods 10 classmates have taken this quiz. Practical Methods 12 classmates have taken this quiz. Or try these Simplify Questions Similar Topics Make it fun & easy Difficulty Easy Normal Hard Generate Quiz Generating Quiz This usually takes {secondsLeft} seconds > ); }
✨
Take an AI Generative Quiz
Convert any text into an interactive quiz session
0/2000
12 classmates have taken this quiz.
10 classmates have taken this quiz.
This usually takes {secondsLeft} seconds