diff --git a/nepalingo-web/src/components/DailyQuiz.tsx b/nepalingo-web/src/components/DailyQuiz.tsx index f3a15f3..07f78f6 100644 --- a/nepalingo-web/src/components/DailyQuiz.tsx +++ b/nepalingo-web/src/components/DailyQuiz.tsx @@ -1,32 +1,46 @@ import React from "react"; -import { useNavigate } from "react-router-dom"; // Import useNavigate +import { useNavigate } from "react-router-dom"; import Button from "./Button"; -const DailyQuiz: React.FC = () => { - const backgroundImageUrl = - "https://t3.ftcdn.net/jpg/00/73/08/22/360_F_73082224_ay4Tus31QNHNmGSIty53ZE6mBrBc47cV.jpg"; // Set your image URL - const navigate = useNavigate(); // Get the navigate function + +interface DailyQuizProps { + backgroundImageUrl: string; + quizYourselfText: string; + descriptionText: string; + buttonText: string; +} + +const DailyQuiz: React.FC = ({ + backgroundImageUrl, + quizYourselfText, + descriptionText, + buttonText, +}) => { + const navigate = useNavigate(); const handleStartQuizClick = () => { - // Redirect to /flashcard when the button is clicked navigate("/flashcard"); }; return (
-

Nepalingo

-

QUIZ YOURSELF

-

- Taking Quiz is a better and fun way for learning -

- +
+

{quizYourselfText}

{/* Reduced margin-bottom */} +

{descriptionText}

{/* Reduced margin-bottom */} + +
); }; diff --git a/nepalingo-web/src/pages/Home.tsx b/nepalingo-web/src/pages/Home.tsx index c930c06..208fd9f 100644 --- a/nepalingo-web/src/pages/Home.tsx +++ b/nepalingo-web/src/pages/Home.tsx @@ -43,7 +43,12 @@ const Home: React.FC = () => {
- +