mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 15:36:53 +02:00
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:
@@ -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>
|
||||
))}
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user