diff --git a/app/(app)/_layout/components/Search.tsx b/app/(app)/_layout/components/Search.tsx index a3ff1a4..1aabe92 100644 --- a/app/(app)/_layout/components/Search.tsx +++ b/app/(app)/_layout/components/Search.tsx @@ -1,6 +1,5 @@ "use client"; -import { Input } from "@/components/ui/input"; import { commandDialogAtom } from "./CommandDialog"; import { useAtom } from "jotai"; import { Button } from "@/components/ui/button"; diff --git a/components/LinkCard/index.tsx b/components/LinkCard/index.tsx index b9eb18f..8cb374b 100644 --- a/components/LinkCard/index.tsx +++ b/components/LinkCard/index.tsx @@ -43,7 +43,7 @@ export default function LinkCard({ }, [url]); if (metadata) { return ( - + {metadata.image && (
diff --git a/components/Modals/CreateSubscriptionTier.tsx b/components/Modals/CreateSubscriptionTier.tsx index 9735b14..a1a290e 100644 --- a/components/Modals/CreateSubscriptionTier.tsx +++ b/components/Modals/CreateSubscriptionTier.tsx @@ -14,6 +14,7 @@ import { NDKList, NDKUser } from "@nostr-dev-kit/ndk"; import { saveEphemeralSigner } from "@/lib/actions/ephemeral"; import { useRouter } from "next/navigation"; import { log } from "@/lib/utils"; +import { follow } from "@/lib/actions/create"; const CreateSubscriptionTierSchema = z.object({ title: z.string(), @@ -56,7 +57,7 @@ export default function CreateSubscriptionTier() { tags.push(["price", satsToBtc(data.price).toString(), "btc", "year"]); } const event = await createEvent(ndk!, { - content: "[]", + content: "", kind: 30044, tags: tags, }); @@ -73,17 +74,13 @@ export default function CreateSubscriptionTier() { }, }), ) - .then((savedSigner) => { - log("info", "savedSigner", savedSigner.toString()); - currentUser.follow( - new NDKUser({ - hexpubkey: savedSigner.pubkey, - }), - ); - return updateList(ndk!, event.rawEvent(), [ + .then(async (savedSigner) => { + await updateList(ndk!, event.rawEvent(), [ ["delegate", savedSigner.pubkey], ]); + return savedSigner.pubkey; }) + .then((delegate) => follow(ndk!, currentUser, delegate)) .catch((err) => console.log("Error creating delegate")); } // getSubscriptionTiers(currentUser!.hexpubkey);