File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- import { useState , useEffect } from "react" ;
1
+ import { useEffect } from "react" ;
2
2
import { Box } from "@mui/material" ;
3
3
4
4
export default function Home ( ) {
@@ -9,7 +9,7 @@ export default function Home() {
9
9
{ difficulty : "Hard" , count : 15 } ,
10
10
] ;
11
11
// State to hold the practice questions data
12
- const [ questionsData , setQuestionsData ] = useState ( practiceQuestions ) ;
12
+ // const [questionsData, setQuestionsData] = useState(practiceQuestions);
13
13
14
14
// You can fetch the actual data from your API using useEffect
15
15
@@ -28,8 +28,8 @@ export default function Home() {
28
28
< div >
29
29
< h2 > Practice Questions</ h2 >
30
30
< ul >
31
- { questionsData . map ( ( question , index ) => (
32
- < li key = { index } >
31
+ { practiceQuestions . map ( ( question ) => (
32
+ < li key = { question . difficulty } >
33
33
{ question . difficulty } : { question . count } questions
34
34
</ li >
35
35
) ) }
You can’t perform that action at this time.
0 commit comments