1
1
import {
2
- // Autocomplete,
3
- // Button,
4
- // Card,
5
- // FormControl,
6
- // Grid2,
7
- // TextField,
2
+ Autocomplete ,
3
+ Button ,
4
+ Card ,
5
+ FormControl ,
6
+ Grid2 ,
7
+ TextField ,
8
8
Typography ,
9
9
} from "@mui/material" ;
10
- // import { useEffect, useReducer, useState } from "react";
10
+ import { useEffect , useReducer , useState } from "react" ;
11
11
12
12
import classes from "./index.module.css" ;
13
13
import AppMargin from "../../components/AppMargin" ;
14
- // import {
15
- // complexityList,
16
- // languageList,
17
- // maxMatchTimeout,
18
- // minMatchTimeout,
19
- // } from "../../utils/constants";
20
- // import reducer, {
21
- // getQuestionCategories,
22
- // initialState,
23
- // } from "../../reducers/questionReducer";
24
- // import CustomChip from "../../components/CustomChip";
25
- // import homepageImage from "/homepage_image.svg";
14
+ import {
15
+ complexityList ,
16
+ languageList ,
17
+ maxMatchTimeout ,
18
+ minMatchTimeout ,
19
+ } from "../../utils/constants" ;
20
+ import reducer , {
21
+ getQuestionCategories ,
22
+ initialState ,
23
+ } from "../../reducers/questionReducer" ;
24
+ import CustomChip from "../../components/CustomChip" ;
25
+ import homepageImage from "/homepage_image.svg" ;
26
26
27
27
const Home : React . FC = ( ) => {
28
- // const [complexity, setComplexity] = useState<string[]>([]);
29
- // const [selectedCategories, setSelectedCategories] = useState<string[]>([]);
30
- // const [language, setLanguage] = useState<string[]>([]);
31
- // const [timeout, setTimeout] = useState<number>(30);
28
+ const [ complexity , setComplexity ] = useState < string [ ] > ( [ ] ) ;
29
+ const [ selectedCategories , setSelectedCategories ] = useState < string [ ] > ( [ ] ) ;
30
+ const [ language , setLanguage ] = useState < string [ ] > ( [ ] ) ;
31
+ const [ timeout , setTimeout ] = useState < number > ( 30 ) ;
32
32
33
- // const [state, dispatch] = useReducer(reducer, initialState);
33
+ const [ state , dispatch ] = useReducer ( reducer , initialState ) ;
34
34
35
- // useEffect(() => {
36
- // getQuestionCategories(dispatch);
37
- // }, []);
35
+ useEffect ( ( ) => {
36
+ getQuestionCategories ( dispatch ) ;
37
+ } , [ ] ) ;
38
38
39
39
return (
40
40
< AppMargin
@@ -65,8 +65,7 @@ const Home: React.FC = () => {
65
65
Your ultimate technical interview preparation platform to practice
66
66
whiteboard style interview questions with a peer.
67
67
</ Typography >
68
- { /*
69
- <Box
68
+ { /* <Box
70
69
component="img"
71
70
src={homepageImage}
72
71
alt="Interview Practice Buddy"
@@ -79,7 +78,7 @@ const Home: React.FC = () => {
79
78
objectFit: "contain",
80
79
}}
81
80
/> */ }
82
- { /* <Card
81
+ < Card
83
82
sx = { {
84
83
padding : 4 ,
85
84
width : "100%" ,
@@ -269,7 +268,7 @@ const Home: React.FC = () => {
269
268
>
270
269
Find my match!
271
270
</ Button >
272
- </Card> */ }
271
+ </ Card >
273
272
</ AppMargin >
274
273
) ;
275
274
} ;
0 commit comments