From 01e05f614e3a7661c817740230e9d70a3aedd35b Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 12 Nov 2022 01:52:20 +0000 Subject: [PATCH] feat: more blockchain info --- src/components/common/BlockchainInfo.tsx | 135 +++++++++++++++-------- 1 file changed, 89 insertions(+), 46 deletions(-) diff --git a/src/components/common/BlockchainInfo.tsx b/src/components/common/BlockchainInfo.tsx index 438112cf..0cd1104a 100644 --- a/src/components/common/BlockchainInfo.tsx +++ b/src/components/common/BlockchainInfo.tsx @@ -1,4 +1,4 @@ -import { CSB_SCAN } from "~/lib/env" +import { CSB_IO, CSB_SCAN } from "~/lib/env" import { UniLink } from "../ui/UniLink" import { Profile, Note } from "~/lib/types" import { Disclosure } from "@headlessui/react" @@ -6,6 +6,12 @@ import { ChevronUpIcon } from "@heroicons/react/20/solid" import { BlockchainIcon } from "~/components/icons/BlockchainIcon" import { toIPFS, toGateway } from "~/lib/ipfs-parser" import { IPFS_SW_GATEWAY_PREFIX } from "~/lib/ipfs-gateway" +import dayjs from "dayjs" +import duration from "dayjs/plugin/duration" +import relativeTime from "dayjs/plugin/relativeTime" + +dayjs.extend(duration) +dayjs.extend(relativeTime) export const BlockchainInfo: React.FC<{ site?: Profile | null @@ -13,7 +19,7 @@ export const BlockchainInfo: React.FC<{ }> = ({ site, page }) => { return (
- + {({ open }: { open: boolean }) => ( <> @@ -26,7 +32,8 @@ export const BlockchainInfo: React.FC<{ ? "post" : "page" : "blog"}{" "} - has been permanently stored on the blockchain by its creator. + has been signed and permanently stored on the blockchain by + its creator. - -