Skip to content

Commit e136409

Browse files
committed
refactor: clean up comments in PrivacyPolicy, TeamsTable, and TaskStatusManager components
1 parent f20d7f2 commit e136409

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

src/components/PrivacyPolicy.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export default function PrivacyPolicyPage() {
3838
visible: { opacity: 1, y: 0, transition: { duration: 0.6 } }
3939
}
4040

41-
// 🔥 Updated for HackOverflow Hackathon
4241
const sections = [
4342
{
4443
icon: <Eye className="h-6 w-6" />,

src/components/admin/teamdetails.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function TeamsTable() {
1111

1212
const rowsPerPage = 10; // Number of rows per page
1313

14-
// Load teams from API
14+
// Load teams from API
1515
const loadTeams = async () => {
1616
try {
1717
setLoading(true);
@@ -30,20 +30,20 @@ export default function TeamsTable() {
3030
loadTeams();
3131
}, []);
3232

33-
// Filter teams by ID or Title
33+
// Filter teams by ID or Title
3434
const filteredTeams = teams.filter((team) =>
3535
[team.teamId.toString(), team.title.toLowerCase()].some((value) =>
3636
value.includes(search.toLowerCase())
3737
)
3838
);
3939

40-
// Pagination logic
40+
// Pagination logic
4141
const startIndex = page * rowsPerPage;
4242
const paginatedTeams = filteredTeams.slice(startIndex, startIndex + rowsPerPage);
4343
const hasPrevious = page > 0;
4444
const hasNext = startIndex + rowsPerPage < filteredTeams.length;
4545

46-
// Render UI
46+
// Render UI
4747
return (
4848
<div className="min-h-screen bg-gradient-to-br from-white to-orange-50 dark:from-black dark:to-black px-4 sm:px-6 py-8 sm:py-12 transition-colors duration-300">
4949
{/* Page Heading */}

src/components/team/Tasks.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { useEffect, useState } from "react";
33
import { motion, AnimatePresence } from "framer-motion";
44
import {
5-
Filter,
65
CheckCircle,
76
Send,
87
Clock,
@@ -23,7 +22,7 @@ export default function TaskStatusManager() {
2322
const [loading, setLoading] = useState(true);
2423
const [error, setError] = useState("");
2524

26-
// ---- Fetch tasks dynamically ----
25+
// Fetch tasks dynamically
2726
useEffect(() => {
2827
const fetchTasks = async () => {
2928
try {
@@ -43,20 +42,18 @@ export default function TaskStatusManager() {
4342
fetchTasks();
4443
}, []);
4544

46-
// ---- Helper: Format date ----
45+
// Helper: Format date
4746
const formatDate = (iso?: string) =>
4847
iso ? new Date(iso).toLocaleString("en-US", { dateStyle: "medium", timeStyle: "short" }) : "";
4948

50-
// ---- Submit for Review ----
49+
// Submit for Review
5150
const handleSubmitForReview = async (id: number, noteText: string) => {
5251
try {
5352
setLoading(true);
5453
setError("");
5554

56-
// 🔥 Actual backend call
5755
await ApiService.team.submitTask(id, { teamNotes: noteText });
5856

59-
// ✅ Optimistic UI update after success
6057
setTasks((prev) =>
6158
prev.map((t) =>
6259
t.id === id
@@ -79,7 +76,7 @@ const handleSubmitForReview = async (id: number, noteText: string) => {
7976
};
8077

8178

82-
// ---- Modal Controls ----
79+
// Modal Controls
8380
const openSubmitModal = (task: Task) => {
8481
setSelectedTask(task);
8582
setTeamNote(task.teamNotes ?? "");

0 commit comments

Comments
 (0)