From acae069b9eb01888721bee10d0821e03d6869431 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 20 Oct 2025 12:56:46 +0300 Subject: [PATCH] chore(client/print): fix typecheck issues --- _regroup/spec/support/etapi.ts | 3 --- apps/client/src/widgets/collections/NoteList.tsx | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_regroup/spec/support/etapi.ts b/_regroup/spec/support/etapi.ts index 307868d7d..b32ba38e7 100644 --- a/_regroup/spec/support/etapi.ts +++ b/_regroup/spec/support/etapi.ts @@ -1,4 +1,3 @@ -import type child_process from "child_process"; import { describe, beforeAll, afterAll } from "vitest"; let etapiAuthToken: string | undefined; @@ -12,8 +11,6 @@ type SpecDefinitionsFunc = () => void; function describeEtapi(description: string, specDefinitions: SpecDefinitionsFunc): void { describe(description, () => { - let appProcess: ReturnType; - beforeAll(async () => {}); afterAll(() => {}); diff --git a/apps/client/src/widgets/collections/NoteList.tsx b/apps/client/src/widgets/collections/NoteList.tsx index f9c9ba5d1..76deeeffe 100644 --- a/apps/client/src/widgets/collections/NoteList.tsx +++ b/apps/client/src/widgets/collections/NoteList.tsx @@ -23,7 +23,7 @@ interface NoteListProps { isEnabled: boolean; ntxId: string | null | undefined; media: ViewModeMedia; - onReady: () => void; + onReady?: () => void; } export default function NoteList(props: Pick) { @@ -36,7 +36,7 @@ export function SearchNoteList(props: Omit } -export function CustomNoteList({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, ...restProps }: NoteListProps) { +export function CustomNoteList({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps }: NoteListProps) { const widgetRef = useRef(null); const viewType = useNoteViewType(note); const noteIds = useNoteIds(note, viewType, ntxId); @@ -79,6 +79,7 @@ export function CustomNoteList({ note, isEnabled: shouldEnable highlightedTokens, viewConfig: viewModeConfig[0], saveConfig: viewModeConfig[1], + onReady: onReady ?? (() => {}), ...restProps } }