diff --git a/task_yell/src/app/home/page.tsx b/task_yell/src/app/home/page.tsx index cb01df8..ae625a8 100644 --- a/task_yell/src/app/home/page.tsx +++ b/task_yell/src/app/home/page.tsx @@ -33,6 +33,7 @@ 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"; export default function Home() { const [todos] = useState([]); @@ -253,43 +254,16 @@ export default function Home() {
-

- wanTODO -

-
- setNewStickyNote(e.target.value)} - placeholder="タイトルを入力" - className="flex-grow" - /> - -
-
- setSearchTerm(e.target.value)} - className="w-full" - /> -
-
- - {filteredStickyNotes.map((note) => ( - - ))} - -
+
diff --git a/task_yell/src/components/wantodo-view.tsx b/task_yell/src/components/wantodo-view.tsx new file mode 100644 index 0000000..e80a955 --- /dev/null +++ b/task_yell/src/components/wantodo-view.tsx @@ -0,0 +1,74 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { AnimatePresence } from "framer-motion"; +import { StickyNote } from "@/components/types"; +import { StickyNoteItem } from "@/components/sticky-note-item"; + +type Props = { + newStickyNote: string; + setNewStickyNote: (note: string) => void; + addStickyNote: () => void; + searchTerm: string; + setSearchTerm: (term: string) => void; + filteredStickyNotes: StickyNote[]; + setDraggedStickyNote: (note: StickyNote | null) => void; + generateStickyNote: (note: StickyNote) => void; + editStickyNote: (note: StickyNote) => void; + deleteStickyNote: (id: string) => void; +} + +export function WantodoView({ + newStickyNote, setNewStickyNote, + addStickyNote, + searchTerm, setSearchTerm, + filteredStickyNotes, + setDraggedStickyNote, + generateStickyNote, + editStickyNote, + deleteStickyNote +}: Props +) { + return ( + <> +

+ wanTODO +

+
+ setNewStickyNote(e.target.value)} + placeholder="タイトルを入力" + className="flex-grow" + /> + +
+
+ setSearchTerm(e.target.value)} + className="w-full" + /> +
+
+ + {filteredStickyNotes.map((note) => ( + + ))} + +
+ + ) +} \ No newline at end of file