Skip to content

Commit

Permalink
Update explorer UI to display chain time info per head state
Browse files Browse the repository at this point in the history
  • Loading branch information
ffakenz committed Feb 29, 2024
1 parent 198c13d commit 0ef3f31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hydra-explorer/json-schemas/hydra-explorer-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ components:
lastUpdatedAtSlotNo:
type: integer
lastUpdatedAtBlockNo:
type: integer
type: integer
6 changes: 6 additions & 0 deletions hydra-explorer/web/src/app/headsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Image from "next/image"
interface HeadState {
headId: string
status: string
lastUpdatedAtSlotNo: number
lastUpdatedAtBlockNo: number
}

const HeadsTable = () => {
Expand Down Expand Up @@ -56,13 +58,17 @@ const HeadsTable = () => {
<tr>
<th className="px-4 py-2">Head ID</th>
<th className="px-4 py-2">Status</th>
<th className="px-4 py-2">Last Updated At SlotNo</th>
<th className="px-4 py-2">Last Updated At BlockNo</th>
</tr>
</thead>
<tbody>
{Heads.map((entry, index) => (
<tr key={index} className={`${index % 2 === 0 ? 'bg-gray-700' : 'bg-gray-600'}`}>
<td className="border px-4 py-2">{entry.headId}</td>
<td className="border px-4 py-2">{entry.status}</td>
<td className="border px-4 py-2">{entry.lastUpdatedAtSlotNo}</td>
<td className="border px-4 py-2">{entry.lastUpdatedAtBlockNo}</td>
</tr>
))}
</tbody>
Expand Down

0 comments on commit 0ef3f31

Please sign in to comment.