Skip to content

Commit

Permalink
Merge pull request #116 from CS3219-AY2324S1/fix-eslint-from-homepage
Browse files Browse the repository at this point in the history
Fix eslint
  • Loading branch information
szelongq authored Nov 15, 2023
2 parents 85cfa39 + eb0262d commit b57ab2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
21 changes: 1 addition & 20 deletions frontend/src/components/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,9 @@
import React, { useEffect } from "react";
import React from "react";
import { Box } from "@mui/material";
import ButtonModal from "./MatchingService/MatchButton";
import QuestionsTable from "./Questions/QuestionsTable";

export default function Home() {
// Sample data for practice questions (you can replace this with actual data)
const practiceQuestions = [
{ difficulty: "Easy", count: 10 },
{ difficulty: "Medium", count: 20 },
{ difficulty: "Hard", count: 15 },
];
// State to hold the practice questions data
// const [questionsData, setQuestionsData] = useState(practiceQuestions);

// You can fetch the actual data from your API using useEffect

useEffect(() => {
// Fetch practice questions data from your API here and update the state
// Example API call:
// fetch('/api/practice-questions')
// .then((response) => response.json())
// .then((data) => setQuestionsData(data));
}, []);

return (
<React.Fragment>
<Box width="80%">
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Navbar from "../components/Navbar";
import Home from "../components/Home";
import "./App.css";
import CenteredContainer from "../components/CenteredContainer";
import QuestionsTable from "../components/Questions/QuestionsTable";

export default function App() {
return (
Expand Down

0 comments on commit b57ab2e

Please sign in to comment.