Skip to content

Commit e11e704

Browse files
committed
update ProblemTable
1 parent a827fc1 commit e11e704

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/components/ProblemTable.jsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const ProblemTable = ({
6868
Name
6969
</th>
7070
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">
71-
Category/Topic
71+
Module / Topics
7272
</th>
7373
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">
7474
Difficulty
@@ -110,15 +110,21 @@ const ProblemTable = ({
110110
</a>
111111
</div>
112112
</td>
113-
{/* <td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-gray-100">
114-
{(problem.topics || []).join(", ")}
115-
</td> */}
116113
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-gray-100">
117114
<div className="flex flex-wrap gap-2">
115+
{problem.listMeta?.section || problem.listMeta?.module ? (
116+
<span
117+
className="px-2 py-1 text-xs bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 rounded"
118+
title="Module / Section"
119+
>
120+
{problem.listMeta.section || problem.listMeta.module}
121+
</span>
122+
) : null}
118123
{(problem.topics || []).map((t, idx) => (
119124
<span
120125
key={idx}
121126
className="px-2 py-1 text-xs bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 rounded"
127+
title="Topic"
122128
>
123129
{t}
124130
</span>

0 commit comments

Comments
 (0)