fix(chat): fix import errors in Communikey renderers

- Import getTagValue from applesauce-core/helpers instead of @/lib/nostr-utils
- Fix Label size prop (use "sm" instead of "xs")
- Remove unused identifier variable in CommunikeyRenderer
This commit is contained in:
Claude
2026-01-20 13:28:37 +00:00
parent 1cdbb22694
commit 3ec9ec264d
2 changed files with 6 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import type { NostrEvent } from "@/types/nostr";
import { getTagValue, getTagValues } from "@/lib/nostr-utils";
import { getTagValues } from "@/lib/nostr-utils";
import { getTagValue } from "applesauce-core/helpers";
import { useProfile } from "@/hooks/useProfile";
import { UserName } from "../UserName";
import { Label } from "@/components/ui/label";
@@ -164,7 +165,7 @@ export function CommunikeyDetailRenderer({
{section.kinds.length > 0 && (
<div className="flex flex-wrap gap-1">
{section.kinds.map((kind) => (
<Label key={kind} size="xs">
<Label key={kind} size="sm">
kind {kind}
</Label>
))}

View File

@@ -1,5 +1,6 @@
import type { NostrEvent } from "@/types/nostr";
import { getTagValue, getTagValues } from "@/lib/nostr-utils";
import { getTagValues } from "@/lib/nostr-utils";
import { getTagValue } from "applesauce-core/helpers";
import { BaseEventContainer, ClickableEventTitle } from "./BaseEventRenderer";
import { useGrimoire } from "@/core/state";
import { MessageSquare, Server } from "lucide-react";
@@ -37,11 +38,7 @@ export function CommunikeyRenderer({ event }: CommunikeyRendererProps) {
const handleOpenChat = () => {
if (!relays.length) return;
// Use relay'pubkey format for compatibility with NIP-29 parser
const primaryRelay = relays[0].replace(/^wss?:\/\//, "");
const identifier = `${primaryRelay}'${communityPubkey}`;
// Open chat command - parser will detect it's a Communikey
// Open chat with Communikey protocol
addWindow("chat", {
protocol: "communikey",
identifier: {