diff --git a/src/components/common/AchievementItem.tsx b/src/components/common/AchievementItem.tsx index a2493411..cf26507f 100644 --- a/src/components/common/AchievementItem.tsx +++ b/src/components/common/AchievementItem.tsx @@ -38,7 +38,7 @@ export const AchievementItem: React.FC<{ group: AchievementSection["groups"][number] layoutId: string size?: number - characterId?: string + characterId?: number isOwner: boolean }> = ({ group, layoutId, size, characterId, isOwner }) => { const date = useDate() diff --git a/src/components/common/AchievementModal.tsx b/src/components/common/AchievementModal.tsx index bb400692..40fb81a3 100644 --- a/src/components/common/AchievementModal.tsx +++ b/src/components/common/AchievementModal.tsx @@ -18,7 +18,7 @@ export const AchievementModal: React.FC<{ group: AchievementSection["groups"][number] layoutId: string isOwner: boolean - characterId?: string + characterId?: number }> = ({ opened, setOpened, group, layoutId, isOwner, characterId }) => { const date = useDate() const { t } = useTranslation("common") diff --git a/src/components/common/BlockchainInfo.tsx b/src/components/common/BlockchainInfo.tsx index c90bcb06..5cec7ccb 100644 --- a/src/components/common/BlockchainInfo.tsx +++ b/src/components/common/BlockchainInfo.tsx @@ -3,24 +3,26 @@ import { useTranslation } from "next-i18next" import { Disclosure } from "@headlessui/react" import { BlockchainIcon } from "~/components/icons/BlockchainIcon" -import { CSB_SCAN, IPFS_GATEWAY } from "~/lib/env" +import { CSB_SCAN } from "~/lib/env" import { toCid, toGateway, toIPFS } from "~/lib/ipfs-parser" -import { Note, Profile } from "~/lib/types" +import { ExpandedCharacter, ExpandedNote } from "~/lib/types" import { cn } from "~/lib/utils" import { useGetGreenfieldId } from "~/queries/site" export const BlockchainInfo: React.FC<{ - site?: Profile | null - page?: Note | null + site?: ExpandedCharacter + page?: ExpandedNote }> = ({ site, page }) => { const { t } = useTranslation(["common", "site"]) - const ipfs = page - ? page.related_urls?.filter((url) => url.startsWith(IPFS_GATEWAY))?.[0] - : site?.metadata?.uri + const ipfs = (page ? page.metadata?.uri : site?.metadata?.uri) || "" const greenfieldId = useGetGreenfieldId(toCid(ipfs)) - const type = page ? (page?.tags?.includes("post") ? "post" : "page") : "blog" + const type = page + ? page?.metadata?.content?.tags?.includes("post") + ? "post" + : "page" + : "blog" return (