More moves to react-query for key library functions
This commit is contained in:
@ -80,6 +80,7 @@ export function HighlightViewNote(props: HighlightViewNoteProps): JSX.Element {
|
||||
const saveText = useCallback(
|
||||
(text: string) => {
|
||||
;(async () => {
|
||||
console.log('saving text: ', text)
|
||||
const success = await updateHighlightMutation({
|
||||
annotation: text,
|
||||
libraryItemId: props.targetId,
|
||||
|
||||
@ -50,6 +50,7 @@ export function HighlightViewNote(props: HighlightViewNoteProps): JSX.Element {
|
||||
const saveText = useCallback(
|
||||
(text: string, updateTime: Date, interactive: boolean) => {
|
||||
;(async () => {
|
||||
console.log('updating highlight text')
|
||||
const success = await updateHighlightMutation({
|
||||
annotation: text,
|
||||
libraryItemId: props.targetId,
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
DropdownOption,
|
||||
DropdownSeparator,
|
||||
} from '../elements/DropdownElements'
|
||||
import { ArticleAttributes } from '../../lib/networking/queries/useGetArticleQuery'
|
||||
import { ArticleAttributes } from '../../lib/networking/library_items/useLibraryItems'
|
||||
import { State } from '../../lib/networking/fragments/articleFragment'
|
||||
|
||||
type DropdownMenuProps = {
|
||||
|
||||
Reference in New Issue
Block a user