Skip to content

Commit

Permalink
Move the sticky class to teh to the thead instead
Browse files Browse the repository at this point in the history
This removes some code duplication.
  • Loading branch information
ffakenz committed Mar 27, 2024
1 parent 6f88e62 commit f1e7508
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hydra-explorer/web/src/components/HeadsTable/index.tsx
Expand Up @@ -20,16 +20,16 @@ const HeadsTable: React.FC = () => {
<p className="text-red-500">{error}</p>
) : (
<div className="w-full">
<table className="table-fixed w-full bg-gray-800 text-white rounded-lg">
<thead className="sticky top-0">
<table className="table-fixed w-full rounded-lg">
<thead className="sticky top-0 text-center px-4 py-2 bg-gray-800">
<tr>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Head ID</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Status</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Slot Number</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Block Number</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Block Hash</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Value Locked</th>
<th className="sticky top-0 text-center px-4 py-2 bg-gray-800 text-white">Details</th>
<th>Head ID</th>
<th>Status</th>
<th>Slot Number</th>
<th>Block Number</th>
<th>Block Hash</th>
<th>Value Locked</th>
<th>Details</th>
</tr>
</thead>
<tbody>
Expand Down

0 comments on commit f1e7508

Please sign in to comment.