diff --git a/src/components/CardSelector.tsx b/src/components/CardSelector.tsx index b71a4b6..31213ac 100644 --- a/src/components/CardSelector.tsx +++ b/src/components/CardSelector.tsx @@ -19,7 +19,6 @@ export function CardSelector() { function StickyNote() { function _handleClick(e: MouseEvent) { - NotesSigal.default.addNote({ type: "note", title: "New Note", diff --git a/src/signals/images.ts b/src/signals/images.ts index 6a35a8d..381b2aa 100644 --- a/src/signals/images.ts +++ b/src/signals/images.ts @@ -1,5 +1,6 @@ import { signal } from "kaioken" import { Card } from "../types" +import { focusedItem } from "." export type ImageCardType = Card<"image"> @@ -16,6 +17,7 @@ function addImage(data: Omit) { } images.value[newCard.id] = newCard images.notify() + focusedItem.value = newCard.id } function removeImage(id: ImageCardType["id"]) { diff --git a/src/signals/notes.ts b/src/signals/notes.ts index e117ba3..755fb69 100644 --- a/src/signals/notes.ts +++ b/src/signals/notes.ts @@ -1,5 +1,6 @@ import { signal } from "kaioken" import { Card } from "../types" +import { focusedItem } from "." export type NoteCardType = Card<"note"> @@ -16,6 +17,7 @@ function addNote(data: Omit) { } notes.value[newCard.id] = newCard notes.notify() + focusedItem.value = newCard.id } function removeNote(id: NoteCardType["id"]) {