diff --git a/apps/web/src/routes/_app/notes.tsx b/apps/web/src/routes/_app/notes.tsx index 7badeb6..921c3c2 100644 --- a/apps/web/src/routes/_app/notes.tsx +++ b/apps/web/src/routes/_app/notes.tsx @@ -1,4 +1,4 @@ -import { useState, useRef, useEffect, memo } from "react"; +import { useState, useRef, useEffect, memo, useCallback } from "react"; import { createRoute } from "@tanstack/react-router"; import { Route as appRoute } from "../_app"; import { useMutation, useQueryClient } from "@tanstack/react-query"; @@ -90,6 +90,10 @@ const NoteEditorPane = memo(function NoteEditorPane({ note, onDelete }: { note: onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["notes"] }); }, }); + const handleSave = useCallback((html: string) => { + updateMutation.mutate({ id: note.id, data: { content: html } }); + }, [note.id, updateMutation]); + return ( <>