diff --git a/task_yell/src/app/home/page.tsx b/task_yell/src/app/home/page.tsx index ae625a8..45e8d40 100644 --- a/task_yell/src/app/home/page.tsx +++ b/task_yell/src/app/home/page.tsx @@ -1,7 +1,6 @@ "use client"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; import { auth } from "@/firebase/client-app"; import { createEvent, readEvents } from "@/lib/events"; import { createNotification } from "@/lib/notifications"; @@ -17,21 +16,17 @@ import { subMonths, } from "date-fns"; import { ja } from "date-fns/locale"; -import { AnimatePresence, motion, useDragControls } from "framer-motion"; import { ChevronLeft, ChevronRight, - ChevronUp, - X, } from "lucide-react"; import { useRouter } from "next/navigation"; -import { useEffect, useMemo, useRef, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { generateStickyNoteServer } from "./actions"; import { Event, Todo, StickyNote } from "@/components/types"; import { Navigation } from "@/components/navigation"; import { EditWantodoDialog } from "@/components/edit-wantodo-dialog"; import { CreateEventDialog } from "@/components/create-event-dialog"; -import { StickyNoteItem } from "@/components/sticky-note-item"; import { CalendarRenderer } from "@/components/calendar-renderer"; import { WantodoView } from "@/components/wantodo-view"; @@ -42,10 +37,6 @@ export default function Home() { const [newStickyNote, setNewStickyNote] = useState(""); const [selectedDate, setSelectedDate] = useState(new Date()); const [currentMonth, setCurrentMonth] = useState(new Date()); - const [isModalOpen, setIsModalOpen] = useState(false); - const [modalState, setModalState] = useState< - "minimized" | "partial" | "full" - >("partial"); const [searchTerm, setSearchTerm] = useState(""); const [editingStickyNote, setEditingStickyNote] = useState( null, @@ -58,8 +49,6 @@ export default function Home() { const [removedStickyNote, setRemovedStickyNote] = useState( null, ); - const dragControls = useDragControls(); - const modalRef = useRef(null); const router = useRouter(); useEffect(() => { @@ -204,14 +193,6 @@ export default function Home() { ); }, [stickyNotes, searchTerm]); - const handleStatusBarClick = () => { - setModalState((prevState) => { - if (prevState === "minimized") return "partial"; - if (prevState === "partial") return "full"; - return "partial"; - }); - }; - return (
- - {isModalOpen && ( - { - if (e.target === e.currentTarget && modalState !== "minimized") { - setIsModalOpen(false); - } - }} - > - { - if (info.offset.y > 200) { - setIsModalOpen(false); - } else if (info.offset.y < -20) { - setModalState("full"); - } else if (info.offset.y > 20 && info.offset.y <= 100) { - setModalState("partial"); - } else if (info.offset.y > 100) { - setModalState("minimized"); - } - }} - className="bg-white dark:bg-gray-800 w-full sm:w-96 md:w-[512px] rounded-t-xl shadow-lg overflow-hidden" - style={{ - maxWidth: "calc(100% - 2rem)", - margin: "0 1rem", - height: modalState === "full" ? "calc(100% - 2rem)" : "auto", - maxHeight: "calc(100% - 2rem)", - zIndex: 60, - }} - > -
dragControls.start(e)} - > - - - {format(selectedDate, "yyyy年MM月dd日", { locale: ja })} - のwanTODO - - {filteredStickyNotes.length > 0 && ( - - ({filteredStickyNotes.length}件) - - )} -
-
-
-

- {format(selectedDate, "yyyy年MM月dd日", { locale: ja })} - のwanTODO -

- -
-
- setNewStickyNote(e.target.value)} - placeholder="新しいwanTODOのタイトルを入力" - className="w-full" - /> - - {filteredStickyNotes.length > 0 ? ( -
- {filteredStickyNotes.map((note) => ( - - ))} -
- ) : ( -

- この日のwanTODOはありません。 -

- )} -
-
-
-
- )} -
-