Parent Blockhash |
diff --git a/explorer/src/components/common/Copyable.tsx b/explorer/src/components/common/Copyable.tsx
index baad55e2e..1a847bd6c 100644
--- a/explorer/src/components/common/Copyable.tsx
+++ b/explorer/src/components/common/Copyable.tsx
@@ -41,7 +41,7 @@ export function Copyable({
return null;
}
- let message = "";
+ let message: string | undefined;
let textColor = "";
if (state === "copied") {
message = "Copied";
@@ -56,7 +56,7 @@ export function Copyable({
<>
- {message}
+ {message !== undefined && {message}}
diff --git a/explorer/src/components/common/Epoch.tsx b/explorer/src/components/common/Epoch.tsx
new file mode 100644
index 000000000..133f493d9
--- /dev/null
+++ b/explorer/src/components/common/Epoch.tsx
@@ -0,0 +1,24 @@
+import React from "react";
+import { Link } from "react-router-dom";
+import { clusterPath } from "utils/url";
+import { Copyable } from "./Copyable";
+
+type Props = {
+ epoch: number;
+ link?: boolean;
+};
+export function Epoch({ epoch, link }: Props) {
+ return (
+
+ {link ? (
+
+
+ {epoch.toLocaleString("en-US")}
+
+
+ ) : (
+ epoch.toLocaleString("en-US")
+ )}
+
+ );
+}
diff --git a/explorer/src/components/common/Slot.tsx b/explorer/src/components/common/Slot.tsx
index f9c6880e2..c2958cd29 100644
--- a/explorer/src/components/common/Slot.tsx
+++ b/explorer/src/components/common/Slot.tsx
@@ -8,15 +8,17 @@ type Props = {
link?: boolean;
};
export function Slot({ slot, link }: Props) {
- return link ? (
-
-
-
- {slot.toLocaleString("en-US")}
-
-
-
- ) : (
- {slot.toLocaleString("en-US")}
+ return (
+
+ {link ? (
+
+
+ {slot.toLocaleString("en-US")}
+
+
+ ) : (
+ slot.toLocaleString("en-US")
+ )}
+
);
}
diff --git a/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx b/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx
index fac051720..da2b87dfa 100644
--- a/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx
+++ b/explorer/src/components/instruction/stake/InitializeDetailsCard.tsx
@@ -9,6 +9,7 @@ import { InstructionCard } from "../InstructionCard";
import { Address } from "components/common/Address";
import { InitializeInfo } from "./types";
import { displayTimestampUtc } from "utils/date";
+import { Epoch } from "components/common/Epoch";
export function InitializeDetailsCard(props: {
ix: ParsedInstruction;
@@ -60,7 +61,9 @@ export function InitializeDetailsCard(props: {
{info.lockup.epoch > 0 && (
|