From a6db06f1234525ce577d4f9bf7611a53b5fced1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hampus=20Sj=C3=B6berg?= Date: Wed, 28 Apr 2021 21:02:52 +0200 Subject: [PATCH] Show miner when hovering over a block --- frontend/components/Block.tsx | 9 +++++++-- frontend/pages/index.tsx | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/components/Block.tsx b/frontend/components/Block.tsx index 04b4af3..a174bb7 100644 --- a/frontend/components/Block.tsx +++ b/frontend/components/Block.tsx @@ -36,15 +36,20 @@ export const EmptyBlock = styled.div` export interface IBlockProps { height: number; signals: boolean | undefined; + miner: string | undefined; } -export function Block({ height, signals }: IBlockProps) { +export function Block({ height, signals, miner }: IBlockProps) { if (signals === undefined) { return ; } + + const hover = `Height: ${height} +Miner: ${miner ?? "Unknown"}`; + return ( - + ); } diff --git a/frontend/pages/index.tsx b/frontend/pages/index.tsx index 50c84ae..62ca8fb 100644 --- a/frontend/pages/index.tsx +++ b/frontend/pages/index.tsx @@ -111,7 +111,7 @@ export default function Blocks() { {blocks.map((block, i) => ( - + ))} {config.donation && }