diff --git a/apps/client/src/widgets/layout/InlineTitle.tsx b/apps/client/src/widgets/layout/InlineTitle.tsx
index 907090253..f6e5a5155 100644
--- a/apps/client/src/widgets/layout/InlineTitle.tsx
+++ b/apps/client/src/widgets/layout/InlineTitle.tsx
@@ -5,6 +5,7 @@ import { Tooltip } from "bootstrap";
import clsx from "clsx";
import { ComponentChild } from "preact";
import { useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
+import type React from "react";
import { Trans } from "react-i18next";
import FNote from "../../entities/fnote";
diff --git a/apps/client/src/widgets/note_icon.tsx b/apps/client/src/widgets/note_icon.tsx
index 7bbbd3e34..51204b015 100644
--- a/apps/client/src/widgets/note_icon.tsx
+++ b/apps/client/src/widgets/note_icon.tsx
@@ -6,6 +6,7 @@ import clsx from "clsx";
import { t } from "i18next";
import { CSSProperties, RefObject } from "preact";
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
+import type React from "react";
import { CellComponentProps, Grid } from "react-window";
import FNote from "../entities/fnote";
@@ -153,10 +154,10 @@ function NoteIconList({ note, dropdownRef }: {
function IconItemCell({ rowIndex, columnIndex, style, filteredIcons }: CellComponentProps<{
filteredIcons: IconWithName[];
-}>): React.JSX.Element {
+}>) {
const iconIndex = rowIndex * 12 + columnIndex;
const iconData = filteredIcons[iconIndex] as IconWithName | undefined;
- if (!iconData) return <>>;
+ if (!iconData) return <>> as React.ReactElement;
const { id, terms, iconPack } = iconData;
return (
@@ -166,7 +167,7 @@ function IconItemCell({ rowIndex, columnIndex, style, filteredIcons }: CellCompo
title={t("note_icon.icon_tooltip", { name: terms?.[0] ?? id, iconPack })}
style={style as CSSProperties}
/>
- );
+ ) as React.ReactElement;
}
function IconFilterContent({ filterByPrefix, setFilterByPrefix }: {
diff --git a/apps/client/src/widgets/react/Modal.tsx b/apps/client/src/widgets/react/Modal.tsx
index 917c3bd99..e7a7c721f 100644
--- a/apps/client/src/widgets/react/Modal.tsx
+++ b/apps/client/src/widgets/react/Modal.tsx
@@ -1,9 +1,8 @@
import { Modal as BootstrapModal } from "bootstrap";
import clsx from "clsx";
-import { ComponentChildren } from "preact";
-import type { CSSProperties, RefObject } from "preact/compat";
+import { ComponentChildren, CSSProperties, RefObject } from "preact";
import { memo } from "preact/compat";
-import { useEffect, useMemo,useRef } from "preact/hooks";
+import { useEffect, useMemo, useRef } from "preact/hooks";
import { openDialog } from "../../services/dialog";
import { t } from "../../services/i18n";
diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx
index 6ac92b420..e6813f8d2 100644
--- a/apps/client/src/widgets/type_widgets/options/other.tsx
+++ b/apps/client/src/widgets/type_widgets/options/other.tsx
@@ -1,20 +1,22 @@
+import { SANITIZER_DEFAULT_ALLOWED_TAGS } from "@triliumnext/commons";
+import { useMemo } from "preact/hooks";
+import type React from "react";
import { Trans } from "react-i18next";
+
import { t } from "../../../services/i18n";
+import search from "../../../services/search";
import server from "../../../services/server";
import toast from "../../../services/toast";
+import { isElectron } from "../../../services/utils";
import Button from "../../react/Button";
-import FormText from "../../react/FormText";
-import OptionsSection from "./components/OptionsSection";
-import TimeSelector from "./components/TimeSelector";
-import { useMemo } from "preact/hooks";
-import { useTriliumOption, useTriliumOptionBool, useTriliumOptionJson } from "../../react/hooks";
-import { SANITIZER_DEFAULT_ALLOWED_TAGS } from "@triliumnext/commons";
import FormCheckbox from "../../react/FormCheckbox";
import FormGroup from "../../react/FormGroup";
-import search from "../../../services/search";
-import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";
import FormSelect from "../../react/FormSelect";
-import { isElectron } from "../../../services/utils";
+import FormText from "../../react/FormText";
+import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";
+import { useTriliumOption, useTriliumOptionBool, useTriliumOptionJson } from "../../react/hooks";
+import OptionsSection from "./components/OptionsSection";
+import TimeSelector from "./components/TimeSelector";
export default function OtherSettings() {
return (
@@ -31,7 +33,7 @@ export default function OtherSettings() {
>
- )
+ );
}
function SearchEngineSettings() {
@@ -82,7 +84,7 @@ function SearchEngineSettings() {
/>
- )
+ );
}
function TrayOptionsSettings() {
@@ -97,7 +99,7 @@ function TrayOptionsSettings() {
onChange={trayEnabled => setDisableTray(!trayEnabled)}
/>
- )
+ );
}
function NoteErasureTimeout() {
@@ -105,13 +107,13 @@ function NoteErasureTimeout() {
{t("note_erasure_timeout.note_erasure_description")}
-
{t("note_erasure_timeout.manual_erasing_description")}
-
+
- )
+ );
}
function AttachmentErasureTimeout() {
@@ -145,7 +147,7 @@ function AttachmentErasureTimeout() {
}}
/>
- )
+ );
}
function RevisionSnapshotInterval() {
@@ -165,7 +167,7 @@ function RevisionSnapshotInterval() {
/>
- )
+ );
}
function RevisionSnapshotLimit() {
@@ -176,7 +178,7 @@ function RevisionSnapshotLimit() {
{t("revisions_snapshot_limit.note_revisions_snapshot_limit_description")}
-
- )
+ );
}
function HtmlImportTags() {
@@ -236,7 +238,7 @@ function HtmlImportTags() {
onClick={() => setAllowedHtmlTags(SANITIZER_DEFAULT_ALLOWED_TAGS)}
/>
- )
+ );
}
function ShareSettings() {
@@ -246,8 +248,8 @@ function ShareSettings() {
return (
- {
if (value) {
@@ -264,17 +266,17 @@ function ShareSettings() {
}
setRedirectBareDomain(value);
}}
- />
+ />
-
- )
+ );
}
function NetworkSettings() {
@@ -288,5 +290,5 @@ function NetworkSettings() {
currentValue={checkForUpdates} onChange={setCheckForUpdates}
/>
- )
-}
\ No newline at end of file
+ );
+}
diff --git a/apps/client/src/widgets/type_widgets/options/text_notes.tsx b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
index 7b6e15dda..e2ff88b44 100644
--- a/apps/client/src/widgets/type_widgets/options/text_notes.tsx
+++ b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
@@ -2,6 +2,7 @@ import { normalizeMimeTypeForCKEditor, type OptionNames } from "@triliumnext/com
import { Themes } from "@triliumnext/highlightjs";
import type { CSSProperties } from "preact/compat";
import { useEffect, useMemo, useState } from "preact/hooks";
+import type React from "react";
import { Trans } from "react-i18next";
import { isExperimentalFeatureEnabled } from "../../../services/experimental_features";