Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions apps/frontend/src/components/GenedsDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,21 @@ export const GenedsDataTable = ({ data }: { data: Gened[] }) => {
))}
</thead>
<tbody>
{table.getRowModel().rows.map((row) => (
<tr key={row.id} className="hover:bg-white">
{row.getVisibleCells().map((cell) => (
<td
className="whitespace-nowrap px-2 text-sm text-gray-600"
key={cell.id}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
</tr>
))}
{table.getRowModel().rows.map((row,idx) => {
const bgColor = idx % 2 == 0 ? "bg-white" : "bg-gray-50";
return (
<tr key={row.id} className={`${bgColor} hover:bg-gray-100 dark:hover:bg-gray-200`}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would benefit from some margin outside the inner text in each row, or some padding within each row. It'll make the gened table look less cramped.

Otherwise I think it looks great

{row.getVisibleCells().map((cell) => (
<td
className="whitespace-nowrap px-3 py-1 text-sm text-gray-600"
key={cell.id}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
</tr>
);
})}
</tbody>
</table>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Session } from "~/app/types";
import { classNames, sessionToShortString, sessionToString } from "~/app/utils";

const SESSIONS: Session[] = [
{ year: "2025", semester: "fall" },
{ year: "2025", semester: "summer" },
{ year: "2025", semester: "spring" },
{ year: "2024", semester: "fall" },
Expand Down
Loading