Skip to content

Commit b4f5c06

Browse files
Remove unsed code/component
1 parent 3e139f1 commit b4f5c06

File tree

2 files changed

+5
-126
lines changed

2 files changed

+5
-126
lines changed

frontend/src/pages/HomePage/HomePage.css

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.homepage {
2-
background-color: rgba(6, 4, 4, 0.813);
2+
/* background-color: rgba(6, 4, 4, 0.813); */
33
display: flex;
44
flex-direction: column;
55
align-items: center;
@@ -8,16 +8,6 @@
88
z-index: -99999;
99
}
1010

11-
.navbar {
12-
display: flex;
13-
width: 100%;
14-
height: 100px;
15-
background-color: rgba(110, 102, 102, 0.7);
16-
border-radius: 0 0 20px 20px;
17-
position: absolute;
18-
top: 0;
19-
}
20-
2111
.title {
2212
color: rgb(255, 253, 250);
2313
font-weight: bolder;
@@ -74,31 +64,6 @@
7464
color: #ffffff;
7565
}
7666

77-
.question-table {
78-
width: 80%;
79-
margin: 20px auto;
80-
border-collapse: collapse; /* Remove the borders between table cells */
81-
background-color: transparent;
82-
border-top: 1px solid #ffffff;
83-
}
84-
85-
.question-table th,
86-
.question-table td {
87-
padding: 10px;
88-
border-bottom: 1px solid #ffffff;
89-
text-align: center;
90-
color: #ffffff;
91-
}
92-
93-
.question-table th {
94-
background-color: transparent;
95-
color: white;
96-
}
97-
98-
.question-table tbody tr {
99-
background-color: transparent;
100-
}
101-
10267
.modal-background {
10368
position: fixed;
10469
top: 0;
Lines changed: 4 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
import React, { useState, useEffect } from "react";
1+
import React, { useState } from "react";
22
import "./HomePage.css";
33
import "bootstrap/dist/css/bootstrap.min.css";
4-
import { Link, useNavigate } from "react-router-dom";
5-
import {
6-
Question,
7-
initializeData,
8-
QuestionData,
9-
} from "../AddQuestionPage/QuestionData";
4+
import { useNavigate } from "react-router-dom";
5+
import { Question, initializeData } from "../AddQuestionPage/QuestionData";
106

117
function HomePage() {
128
let history = useNavigate();
@@ -79,89 +75,7 @@ function HomePage() {
7975
setFilteredData(filtered);
8076
};
8177

82-
return (
83-
<div className="homepage">
84-
<div className="background" />
85-
86-
<div className="navbar">
87-
<div className="title">Peer Prep</div>
88-
</div>
89-
90-
<div className="content-container">
91-
<input
92-
type="text"
93-
className="search-bar"
94-
placeholder="Search questions"
95-
value={searchQuery}
96-
onChange={handleSearchInputChange}
97-
/>
98-
<div className="add-question-button">
99-
<Link to="/create" className="add-question-text">
100-
Add Question
101-
</Link>
102-
</div>
103-
</div>
104-
105-
<table className="question-table">
106-
<thead>
107-
<tr>
108-
<th>Question Id</th>
109-
<th>Question Title</th>
110-
<th>Question Description</th>
111-
<th>Question Category</th>
112-
<th>Question Complexity</th>
113-
<th>Delete</th>
114-
</tr>
115-
</thead>
116-
<tbody>
117-
{filteredData.map((item: Question) => (
118-
<tr key={item.id}>
119-
<td>{item.id}</td>
120-
<td>{item.title}</td>
121-
<td>{item.description}</td>
122-
<td>{item.category}</td>
123-
<td>
124-
<div
125-
style={{
126-
display: "flex",
127-
justifyContent: "center", // Horizontally center the box
128-
alignItems: "center", // Vertically center the box
129-
}}
130-
>
131-
<div
132-
style={{
133-
backgroundColor:
134-
item.complexity === "1"
135-
? "rgba(0, 255, 0, 0.3)"
136-
: item.complexity === "2"
137-
? "rgba(255, 255, 0, 0.3)"
138-
: "rgba(255, 0, 0, 0.3)",
139-
padding: "4px",
140-
borderRadius: "5px",
141-
width: "30px", // Set the width here
142-
textAlign: "center",
143-
fontWeight: "bold",
144-
color: "white",
145-
}}
146-
>
147-
{item.complexity}
148-
</div>
149-
</div>
150-
</td>
151-
<td>
152-
<button
153-
className="delete-button"
154-
onClick={() => handleDelete(item.id)}
155-
>
156-
<i className="trash-icon"></i>
157-
</button>
158-
</td>
159-
</tr>
160-
))}
161-
</tbody>
162-
</table>
163-
</div>
164-
);
78+
return <></>;
16579
}
16680

16781
export default HomePage;

0 commit comments

Comments
 (0)