57 lines
1.8 KiB
TypeScript
Raw Permalink Normal View History

2023-10-17 09:06:09 -04:00
"use client";
import { useState, useRef, useEffect } from "react";
import Link from "next/link";
import Template from "./Template";
import { Button } from "@/components/ui/button";
import { useModal } from "@/app/_providers/modal/provider";
import { nip19 } from "nostr-tools";
// import { useKeys } from "@/app/_providers/keysProvider";
import { useNDK } from "@/app/_providers/ndk";
import useCurrentUser from "@/lib/hooks/useCurrentUser";
import {
HiChatBubbleLeftEllipsis,
2023-10-30 10:36:17 -04:00
HiSquaresPlus,
2023-10-17 09:06:09 -04:00
HiNewspaper,
2023-10-24 14:39:10 -04:00
HiCalendarDays,
2023-10-17 09:06:09 -04:00
} from "react-icons/hi2";
import { RiCalendarEventFill, RiEdit2Fill } from "react-icons/ri";
2023-10-17 09:06:09 -04:00
import { formatCount } from "@/lib/utils";
2023-10-23 14:14:56 -04:00
import CreateCalendarEventModal from "./CreateCalendarEvent";
2023-10-27 20:31:13 -04:00
import CreateCalendarModal from "./CreateCalendar";
import Kind1Modal from "./Kind1";
2023-10-30 10:36:17 -04:00
import TileIconButton from "../Buttons/TileIconButton";
2023-10-17 09:06:09 -04:00
export default function NewEventModal() {
const modal = useModal();
return (
2023-10-30 10:36:17 -04:00
<Template title="Time to publish..." className="md:max-w-[400px]">
<div className="center items-stretch gap-3">
<TileIconButton
className="flex-1"
label="Add Note"
icon={(props) => <RiEdit2Fill {...props} />}
onClick={() => {
modal?.swap(<Kind1Modal />);
}}
/>
2023-10-30 10:36:17 -04:00
<TileIconButton
className="flex-1"
label="Add Event"
icon={(props) => <HiSquaresPlus {...props} />}
2023-10-23 14:14:56 -04:00
onClick={() => {
modal?.swap(<CreateCalendarEventModal />);
}}
2023-10-30 10:36:17 -04:00
/>
<TileIconButton
className="flex-1"
label="Create Calendar"
icon={(props) => <RiCalendarEventFill {...props} />}
2023-10-27 20:31:13 -04:00
onClick={() => {
modal?.swap(<CreateCalendarModal />);
}}
2023-10-30 10:36:17 -04:00
/>
2023-10-17 09:06:09 -04:00
</div>
</Template>
);
}