mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-09 22:31:10 +00:00
Fix biome formatting in document-modal useCallback
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2828978dff
commit
1751ff3e70
1 changed files with 14 additions and 10 deletions
|
|
@ -236,16 +236,20 @@ export function DocumentModal({
|
|||
draftContentString !== initialEditorString &&
|
||||
draftContentString !== lastSavedContent
|
||||
|
||||
const handleSave = useCallback((submittedContent?: string) => {
|
||||
if (!_document?.id) return
|
||||
const content = submittedContent ?? draftContentString
|
||||
updateMutation.mutate(
|
||||
{ documentId: _document.id, content },
|
||||
{
|
||||
onSuccess: (_data, variables) => setLastSavedContent(variables.content),
|
||||
},
|
||||
)
|
||||
}, [_document?.id, draftContentString, updateMutation])
|
||||
const handleSave = useCallback(
|
||||
(submittedContent?: string) => {
|
||||
if (!_document?.id) return
|
||||
const content = submittedContent ?? draftContentString
|
||||
updateMutation.mutate(
|
||||
{ documentId: _document.id, content },
|
||||
{
|
||||
onSuccess: (_data, variables) =>
|
||||
setLastSavedContent(variables.content),
|
||||
},
|
||||
)
|
||||
},
|
||||
[_document?.id, draftContentString, updateMutation],
|
||||
)
|
||||
|
||||
const textEditorProps = useMemo(
|
||||
() => ({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue