icon
This commit is contained in:
parent
bc18095315
commit
08e9ca1713
@ -12,7 +12,7 @@ import {
|
|||||||
HiChatBubbleLeftEllipsis,
|
HiChatBubbleLeftEllipsis,
|
||||||
HiBookmarkSquare,
|
HiBookmarkSquare,
|
||||||
HiNewspaper,
|
HiNewspaper,
|
||||||
HiUserGroup,
|
HiCalendarDays,
|
||||||
} from "react-icons/hi2";
|
} from "react-icons/hi2";
|
||||||
import { RiSubtractFill, RiAddFill } from "react-icons/ri";
|
import { RiSubtractFill, RiAddFill } from "react-icons/ri";
|
||||||
import { formatCount } from "@/lib/utils";
|
import { formatCount } from "@/lib/utils";
|
||||||
@ -41,7 +41,7 @@ export default function NewEventModal() {
|
|||||||
className="w-full gap-x-1"
|
className="w-full gap-x-1"
|
||||||
>
|
>
|
||||||
<span>Calendar Event</span>
|
<span>Calendar Event</span>
|
||||||
<HiChatBubbleLeftEllipsis className="h-4 w-4" />
|
<HiCalendarDays className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Link href={`/article/new`}>
|
<Link href={`/article/new`}>
|
||||||
<Button onClick={() => modal?.hide()} className="w-full gap-x-1">
|
<Button onClick={() => modal?.hide()} className="w-full gap-x-1">
|
||||||
|
@ -27,8 +27,8 @@ export async function createEvent(
|
|||||||
) {
|
) {
|
||||||
log("func", "createEvent");
|
log("func", "createEvent");
|
||||||
try {
|
try {
|
||||||
const pubkey = await window.nostr?.getPublicKey();
|
const pubkey = ndk.activeUser?.pubkey;
|
||||||
if (!pubkey || !window.nostr) {
|
if (!pubkey) {
|
||||||
throw new Error("No public key provided!");
|
throw new Error("No public key provided!");
|
||||||
}
|
}
|
||||||
const eventToPublish = new NDKEvent(ndk, {
|
const eventToPublish = new NDKEvent(ndk, {
|
||||||
@ -57,8 +57,8 @@ export async function createEventHandler(
|
|||||||
delegateSigner?: NDKPrivateKeySigner,
|
delegateSigner?: NDKPrivateKeySigner,
|
||||||
) {
|
) {
|
||||||
log("func", "createEventHandler");
|
log("func", "createEventHandler");
|
||||||
const pubkey = await window.nostr?.getPublicKey();
|
const pubkey = ndk.activeUser?.pubkey;
|
||||||
if (!pubkey || !window.nostr) {
|
if (!pubkey) {
|
||||||
throw new Error("No public key provided!");
|
throw new Error("No public key provided!");
|
||||||
}
|
}
|
||||||
const eventToPublish = new NDKEvent(ndk, {
|
const eventToPublish = new NDKEvent(ndk, {
|
||||||
@ -333,7 +333,6 @@ export async function createCalendarEvent(
|
|||||||
} as NostrEvent);
|
} as NostrEvent);
|
||||||
|
|
||||||
await eventToPublish.sign();
|
await eventToPublish.sign();
|
||||||
|
|
||||||
let publishedEvent: NDKEvent | null = null;
|
let publishedEvent: NDKEvent | null = null;
|
||||||
// Check if is private event
|
// Check if is private event
|
||||||
if (isPrivate) {
|
if (isPrivate) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user