This commit is contained in:
zmeyer44 2023-10-24 14:39:10 -04:00
parent bc18095315
commit 08e9ca1713
2 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,7 @@ import {
HiChatBubbleLeftEllipsis,
HiBookmarkSquare,
HiNewspaper,
HiUserGroup,
HiCalendarDays,
} from "react-icons/hi2";
import { RiSubtractFill, RiAddFill } from "react-icons/ri";
import { formatCount } from "@/lib/utils";
@ -41,7 +41,7 @@ export default function NewEventModal() {
className="w-full gap-x-1"
>
<span>Calendar Event</span>
<HiChatBubbleLeftEllipsis className="h-4 w-4" />
<HiCalendarDays className="h-4 w-4" />
</Button>
<Link href={`/article/new`}>
<Button onClick={() => modal?.hide()} className="w-full gap-x-1">

View File

@ -27,8 +27,8 @@ export async function createEvent(
) {
log("func", "createEvent");
try {
const pubkey = await window.nostr?.getPublicKey();
if (!pubkey || !window.nostr) {
const pubkey = ndk.activeUser?.pubkey;
if (!pubkey) {
throw new Error("No public key provided!");
}
const eventToPublish = new NDKEvent(ndk, {
@ -57,8 +57,8 @@ export async function createEventHandler(
delegateSigner?: NDKPrivateKeySigner,
) {
log("func", "createEventHandler");
const pubkey = await window.nostr?.getPublicKey();
if (!pubkey || !window.nostr) {
const pubkey = ndk.activeUser?.pubkey;
if (!pubkey) {
throw new Error("No public key provided!");
}
const eventToPublish = new NDKEvent(ndk, {
@ -333,7 +333,6 @@ export async function createCalendarEvent(
} as NostrEvent);
await eventToPublish.sign();
let publishedEvent: NDKEvent | null = null;
// Check if is private event
if (isPrivate) {