File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
packages/app-expo/src/screens Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11/**
22 * useReaderBookmark — handles bookmark toggling, pending snippet requests, and bookmark list.
33 */
4- import { useAnnotationStore } from "@/stores" ;
4+ import { useAnnotationStore , type AnnotationState } from "@/stores" ;
55import { generateId } from "@readany/core/utils" ;
66import { useCallback , useMemo , useRef } from "react" ;
77
@@ -14,8 +14,8 @@ export interface UseReaderBookmarkOptions {
1414
1515export interface UseReaderBookmarkResult {
1616 isBookmarked : boolean ;
17- bookBookmarks : ReturnType < typeof useAnnotationStore > [ "bookmarks" ] ;
18- existingBookmark : ReturnType < typeof useAnnotationStore > [ "bookmarks" ] [ number ] | undefined ;
17+ bookBookmarks : AnnotationState [ "bookmarks" ] ;
18+ existingBookmark : AnnotationState [ "bookmarks" ] [ number ] | undefined ;
1919 handleToggleBookmark : ( ) => void ;
2020 pendingBookmarkRef : React . RefObject < boolean > ;
2121 onBookmarkSnippet : ( text : string ) => void ;
Original file line number Diff line number Diff line change 1- import { type LANQRData , createLANServer } from "@readany/core/sync/lan-backend" ;
1+ import { type LANQRData , createLANServer } from "@readany/core/sync/lan-server" ;
2+ import type { ISyncBackend } from "@readany/core/sync/sync-backend" ;
23import QRCode from "react-native-qrcode-svg" ;
34import { useCallback , useRef , useState } from "react" ;
45import { useTranslation } from "react-i18next" ;
@@ -28,7 +29,7 @@ interface LanSectionProps {
2829 } | null ;
2930 pulseAnim : Animated . Value ;
3031 progressLabel : ( ) => string | null ;
31- onSyncWithBackend : ( backend : unknown ) => Promise < { success : boolean ; error ?: string } | null > ;
32+ onSyncWithBackend : ( backend : ISyncBackend ) => Promise < { success : boolean ; error ?: string } | null > ;
3233}
3334
3435export function LanSection ( {
@@ -67,11 +68,11 @@ export function LanSection({
6768 const server = createLANServer ( {
6869 deviceName,
6970 events : {
70- onStatusChange : ( status ) => {
71+ onStatusChange : ( status : string ) => {
7172 setLanServerStatus ( status ) ;
7273 if ( status === "error" ) setShowManualIPInput ( true ) ;
7374 } ,
74- onError : ( err ) => {
75+ onError : ( err : string ) => {
7576 setLanError ( err ) ;
7677 setShowManualIPInput ( true ) ;
7778 } ,
You can’t perform that action at this time.
0 commit comments