From 612ef1bc1005e6c06752205bf4e7b1f2203e8c6b Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Sat, 23 May 2020 16:47:35 +0800 Subject: [PATCH] Fix format --- explorer/src/components/Copyable.tsx | 16 +++++++++++++-- explorer/src/components/InfoTooltip.tsx | 20 ++++++++++++++++--- .../src/components/TransactionDetails.tsx | 10 ++++++++-- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/explorer/src/components/Copyable.tsx b/explorer/src/components/Copyable.tsx index 380997dda3..fe2f84c9ef 100644 --- a/explorer/src/components/Copyable.tsx +++ b/explorer/src/components/Copyable.tsx @@ -9,11 +9,23 @@ type CopyableProps = { type State = "hide" | "copy" | "copied"; -function Popover({ state, bottom, right }: { state: State; bottom?: boolean, right?: boolean }) { +function Popover({ + state, + bottom, + right +}: { + state: State; + bottom?: boolean; + right?: boolean; +}) { if (state === "hide") return null; const text = state === "copy" ? "Copy" : "Copied!"; return ( -
+
{text}
diff --git a/explorer/src/components/InfoTooltip.tsx b/explorer/src/components/InfoTooltip.tsx index 5eb5e1d845..561102de94 100644 --- a/explorer/src/components/InfoTooltip.tsx +++ b/explorer/src/components/InfoTooltip.tsx @@ -9,10 +9,24 @@ type Props = { type State = "hide" | "show"; -function Popover({ state, bottom, right, text }: { state: State; bottom?: boolean, right?: boolean, text: string }) { +function Popover({ + state, + bottom, + right, + text +}: { + state: State; + bottom?: boolean; + right?: boolean; + text: string; +}) { if (state === "hide") return null; return ( -
+
{text}
@@ -24,7 +38,7 @@ function InfoTooltip({ bottom, right, text, children }: Props) { return (
setState("show")} onMouseOut={() => setState("hide")} > diff --git a/explorer/src/components/TransactionDetails.tsx b/explorer/src/components/TransactionDetails.tsx index b14eb51b8f..0844bce8d6 100644 --- a/explorer/src/components/TransactionDetails.tsx +++ b/explorer/src/components/TransactionDetails.tsx @@ -150,8 +150,14 @@ function StatusCard({ signature }: Props) { Timestamp - {info.timestamp !== "unavailable" ? displayTimestamp(info.timestamp) : ( - + {info.timestamp !== "unavailable" ? ( + displayTimestamp(info.timestamp) + ) : ( + Unavailable )}