diff --git a/apps/client/src/widgets/dialogs/add_link.tsx b/apps/client/src/widgets/dialogs/add_link.tsx index 2cca693474..f017914e93 100644 --- a/apps/client/src/widgets/dialogs/add_link.tsx +++ b/apps/client/src/widgets/dialogs/add_link.tsx @@ -4,9 +4,8 @@ import ReactBasicWidget from "../react/ReactBasicWidget"; import Button from "../react/Button"; import FormRadioGroup from "../react/FormRadioGroup"; import NoteAutocomplete from "../react/NoteAutocomplete"; -import { useRef, useState } from "preact/hooks"; +import { useRef, useState, useEffect } from "preact/hooks"; import tree from "../../services/tree"; -import { useEffect } from "react"; import note_autocomplete, { Suggestion } from "../../services/note_autocomplete"; import { default as TextTypeWidget } from "../type_widgets/editable_text.js"; import { logError } from "../../services/ws"; diff --git a/apps/client/src/widgets/dialogs/clone_to.tsx b/apps/client/src/widgets/dialogs/clone_to.tsx index 791da3f1b1..f8929f00dc 100644 --- a/apps/client/src/widgets/dialogs/clone_to.tsx +++ b/apps/client/src/widgets/dialogs/clone_to.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import appContext from "../../components/app_context"; import { t } from "../../services/i18n"; import Modal from "../react/Modal"; diff --git a/apps/client/src/widgets/dialogs/confirm.tsx b/apps/client/src/widgets/dialogs/confirm.tsx index db344ab002..28c9fcc4a3 100644 --- a/apps/client/src/widgets/dialogs/confirm.tsx +++ b/apps/client/src/widgets/dialogs/confirm.tsx @@ -2,7 +2,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget"; import Modal from "../react/Modal"; import Button from "../react/Button"; import { t } from "../../services/i18n"; -import { useState } from "react"; +import { useState } from "preact/hooks"; import FormCheckbox from "../react/FormCheckbox"; import useTriliumEvent from "../react/hooks"; diff --git a/apps/client/src/widgets/dialogs/delete_notes.tsx b/apps/client/src/widgets/dialogs/delete_notes.tsx index a4c62a164d..9af85d5182 100644 --- a/apps/client/src/widgets/dialogs/delete_notes.tsx +++ b/apps/client/src/widgets/dialogs/delete_notes.tsx @@ -3,7 +3,7 @@ import { t } from "../../services/i18n.js"; import FormCheckbox from "../react/FormCheckbox.js"; import Modal from "../react/Modal.js"; import ReactBasicWidget from "../react/ReactBasicWidget.js"; -import { useEffect } from "react"; +import { useEffect } from "preact/hooks"; import type { DeleteNotesPreview } from "@triliumnext/commons"; import server from "../../services/server.js"; import froca from "../../services/froca.js"; diff --git a/apps/client/src/widgets/dialogs/include_note.tsx b/apps/client/src/widgets/dialogs/include_note.tsx index 35e7f210ba..70f99b7e51 100644 --- a/apps/client/src/widgets/dialogs/include_note.tsx +++ b/apps/client/src/widgets/dialogs/include_note.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import { t } from "../../services/i18n"; import FormGroup from "../react/FormGroup"; import FormRadioGroup from "../react/FormRadioGroup"; diff --git a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx index c547bb8fc1..e0165b7d03 100644 --- a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx +++ b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx @@ -1,4 +1,4 @@ -import { useRef } from "react"; +import { useRef } from "preact/hooks"; import { t } from "../../services/i18n.js"; import utils from "../../services/utils.js"; import Button from "../react/Button.js"; diff --git a/apps/client/src/widgets/dialogs/markdown_import.tsx b/apps/client/src/widgets/dialogs/markdown_import.tsx index ed00845294..4f91278d9c 100644 --- a/apps/client/src/widgets/dialogs/markdown_import.tsx +++ b/apps/client/src/widgets/dialogs/markdown_import.tsx @@ -1,4 +1,4 @@ -import { useCallback, useRef, useState } from "preact/compat"; +import { useCallback, useRef, useState } from "preact/hooks"; import appContext from "../../components/app_context"; import { t } from "../../services/i18n"; import server from "../../services/server"; diff --git a/apps/client/src/widgets/dialogs/move_to.tsx b/apps/client/src/widgets/dialogs/move_to.tsx index 577d7927e9..b4e53fc09d 100644 --- a/apps/client/src/widgets/dialogs/move_to.tsx +++ b/apps/client/src/widgets/dialogs/move_to.tsx @@ -5,7 +5,7 @@ import NoteList from "../react/NoteList"; import FormGroup from "../react/FormGroup"; import NoteAutocomplete from "../react/NoteAutocomplete"; import Button from "../react/Button"; -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import { Suggestion, triggerRecentNotes } from "../../services/note_autocomplete"; import tree from "../../services/tree"; import froca from "../../services/froca"; diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx index 0da5787332..8513dd6157 100644 --- a/apps/client/src/widgets/dialogs/revisions.tsx +++ b/apps/client/src/widgets/dialogs/revisions.tsx @@ -14,7 +14,7 @@ import utils from "../../services/utils"; import { Dispatch, StateUpdater, useEffect, useRef, useState } from "preact/hooks"; import protected_session_holder from "../../services/protected_session_holder"; import { renderMathInElement } from "../../services/math"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; import open from "../../services/open"; import ActionButton from "../react/ActionButton"; import options from "../../services/options"; diff --git a/apps/client/src/widgets/dialogs/upload_attachments.tsx b/apps/client/src/widgets/dialogs/upload_attachments.tsx index 00bb1cdd93..3db6fbb719 100644 --- a/apps/client/src/widgets/dialogs/upload_attachments.tsx +++ b/apps/client/src/widgets/dialogs/upload_attachments.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "preact/compat"; +import { useEffect, useState } from "preact/hooks"; import { t } from "../../services/i18n"; import Button from "../react/Button"; import FormCheckbox from "../react/FormCheckbox"; diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsx index 836303ff66..4362b1680a 100644 --- a/apps/client/src/widgets/react/Button.tsx +++ b/apps/client/src/widgets/react/Button.tsx @@ -1,5 +1,5 @@ -import { RefObject } from "preact"; -import { CSSProperties } from "preact/compat"; +import type { RefObject } from "preact"; +import type { CSSProperties } from "preact/compat"; import { useRef } from "preact/hooks"; interface ButtonProps { diff --git a/apps/client/src/widgets/react/FormCheckbox.tsx b/apps/client/src/widgets/react/FormCheckbox.tsx index 690145b58e..65c90c53f5 100644 --- a/apps/client/src/widgets/react/FormCheckbox.tsx +++ b/apps/client/src/widgets/react/FormCheckbox.tsx @@ -1,5 +1,5 @@ import { Tooltip } from "bootstrap"; -import { useEffect, useRef } from "preact/compat"; +import { useEffect, useRef } from "preact/hooks"; import { escapeQuotes } from "../../services/utils"; import { ComponentChildren } from "preact"; diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx index a5c677d746..96ab65ed23 100644 --- a/apps/client/src/widgets/react/FormList.tsx +++ b/apps/client/src/widgets/react/FormList.tsx @@ -1,6 +1,6 @@ import { ComponentChildren } from "preact"; import Icon from "./Icon"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface FormListOpts { children: ComponentChildren; diff --git a/apps/client/src/widgets/react/FormTextBox.tsx b/apps/client/src/widgets/react/FormTextBox.tsx index 476825d961..5477a9c4de 100644 --- a/apps/client/src/widgets/react/FormTextBox.tsx +++ b/apps/client/src/widgets/react/FormTextBox.tsx @@ -1,4 +1,4 @@ -import { InputHTMLAttributes, RefObject } from "preact/compat"; +import type { InputHTMLAttributes, RefObject } from "preact/compat"; interface FormTextBoxProps extends Pick, "placeholder" | "autoComplete" | "className" | "type" | "name" | "pattern" | "title" | "style"> { id?: string; diff --git a/apps/client/src/widgets/react/NoteAutocomplete.tsx b/apps/client/src/widgets/react/NoteAutocomplete.tsx index 49656bf715..fb5274318e 100644 --- a/apps/client/src/widgets/react/NoteAutocomplete.tsx +++ b/apps/client/src/widgets/react/NoteAutocomplete.tsx @@ -1,9 +1,9 @@ import { useRef } from "preact/hooks"; import { t } from "../../services/i18n"; -import { useEffect } from "react"; +import { useEffect } from "preact/hooks"; import note_autocomplete, { Options, type Suggestion } from "../../services/note_autocomplete"; import type { RefObject } from "preact"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface NoteAutocompleteProps { inputRef?: RefObject; diff --git a/apps/client/src/widgets/react/NoteList.tsx b/apps/client/src/widgets/react/NoteList.tsx index db84995c00..59a9f858b6 100644 --- a/apps/client/src/widgets/react/NoteList.tsx +++ b/apps/client/src/widgets/react/NoteList.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "preact/hooks"; import type FNote from "../../entities/fnote"; import froca from "../../services/froca"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface NoteListProps { noteIds?: string[]; diff --git a/apps/client/src/widgets/react/RawHtml.tsx b/apps/client/src/widgets/react/RawHtml.tsx index ec208fac18..fc46328813 100644 --- a/apps/client/src/widgets/react/RawHtml.tsx +++ b/apps/client/src/widgets/react/RawHtml.tsx @@ -1,4 +1,4 @@ -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; type HTMLElementLike = string | HTMLElement | JQuery;