Skip to content

Commit 4b7524d

Browse files
committed
Cleaned up front-end debug logs
1 parent 912b1e8 commit 4b7524d

8 files changed

Lines changed: 0 additions & 28 deletions

File tree

src/components/leader_view.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ const LeaderView = ({ TEAM_DATA, UpdateTeamName, newTeamName,
132132
showPasswordPrompt((password) => {
133133
if (password !== null) {
134134
LeaderLeaving(password);
135-
} else {
136-
// User cancelled password input
137-
console.log("Password prompt cancelled");
138135
}
139136
});
140137
}

src/pages/admin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export function Admin() {
2525
});
2626

2727
const data = await response.json();
28-
console.log("Server Response:", data.message);
2928
let msgArea = document.getElementById('msg_popup');
3029

3130
if (data.message === "Login Successful!") {

src/pages/admin_panel.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export function AdminPanel() {
8181

8282
const data = await response.json();
8383
if (data) {
84-
console.log(data)
8584
setUsers(data);
8685
}
8786
} catch (err) {
@@ -247,9 +246,6 @@ export function AdminPanel() {
247246
setMsgContent("<p style='color: red;'> Error Occured! </p>");
248247
}
249248
}
250-
} else {
251-
// User cancelled password input
252-
console.log("Password prompt cancelled");
253249
}
254250
});
255251
}
@@ -383,7 +379,6 @@ export function AdminPanel() {
383379

384380
// get the response output from the above fetch call
385381
const data = await response.text();
386-
console.log("Server Response:", data);
387382

388383
if (data === "Admin Added Successfully!") {
389384
if (msgArea) {
@@ -477,7 +472,6 @@ export function AdminPanel() {
477472
const data = await response.json();
478473

479474
if (data) {
480-
console.log(data)
481475
setFiles(data);
482476
}
483477
} catch (error) {
@@ -571,9 +565,6 @@ export function AdminPanel() {
571565
setMsgContent("<p style='color: red;'> Error Occured! </p>");
572566
}
573567
}
574-
} else {
575-
// User cancelled password input
576-
console.log("Password prompt cancelled");
577568
}
578569
});
579570
}

src/pages/challenges.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ export function Challenges() {
6262

6363
const SelfFilterChallenges = useCallback(async (data) => {
6464
if (!profileData) {
65-
console.log("No Profile Data!");
6665
return data;
6766
}
6867

6968
if (profileData.completions.length === 0) {
70-
console.log("No Completions on Profile!");
7169
return data;
7270
}
7371

@@ -78,8 +76,6 @@ export function Challenges() {
7876
const exists = profileData.completions.find(chall => chall.name === targetName);
7977
if (!exists) {
8078
filteredChallenges.push(challenge);
81-
} else {
82-
console.log("Completed: ", challenge.name);
8379
}
8480
}
8581

@@ -118,7 +114,6 @@ export function Challenges() {
118114
const selfFilteredData = await SelfFilterChallenges(data);
119115

120116
if (!teamData || showSelfCompleted) {
121-
console.log("Heres your unfinished business!: ", selfFilteredData);
122117
setChallenges(selfFilteredData);
123118
} else {
124119
setChallenges(teamFilteredData);

src/pages/leaderboard.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export function Leaderboard() {
8282

8383
<div className="container mt-2 d-flex justify-content-center gap-3">
8484
{/* THIS CARD ONLY SHOWS WHEN A USER IS AUTHENTICATED */}
85-
{console.log(userData)}
8685
{(userData) && (
8786
<div
8887
className="card shadow-sm"

src/pages/login.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function Login() {
2929

3030
// get the response output from the above fetch call
3131
const data = await response.json();
32-
console.log("Server Response:", data.message);
3332

3433
if (data.message === "Login Successful!") {
3534
if (msgArea) {

src/pages/rate_challenge.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export function RatingPage() {
4747
});
4848

4949
const data = await response.json();
50-
console.log("Challenge Details: ", data);
5150
return data;
5251
} catch (error) {
5352
console.error("Error sending request:", error);
@@ -73,9 +72,6 @@ export function RatingPage() {
7372

7473
// Handle form submission for each challenge
7574
const handleSubmit = async (event, challengeName) => {
76-
//event.preventDefault(); // Prevent page reload
77-
console.log(`Submitted for ${challengeName}: Rating: ${ratings[challengeName]}`);
78-
// Add your logic here to send the data to an API or handle it further
7975
try {
8076
const response = await fetch(`http://${GetBackendHost()}/rate-challenge`, {
8177
method: "POST",
@@ -90,9 +86,6 @@ export function RatingPage() {
9086
});
9187

9288
const data = await response.json();
93-
if (data) {
94-
console.log(data.message)
95-
}
9689
} catch (error) {
9790
console.error("Error sending request:", error);
9891
}

src/pages/register.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export function Register() {
3030

3131
// get the response output from the above fetch call
3232
const data = await response.text();
33-
console.log("Server Response:", data);
3433

3534
if (data === "User Added Successfully!") {
3635
if (msgArea) {

0 commit comments

Comments
 (0)