diff --git a/app/assets/javascripts/components/AccountMenu/Authentication.tsx b/app/assets/javascripts/components/AccountMenu/Authentication.tsx
index 7fbc00c36..1e16c3b81 100644
--- a/app/assets/javascripts/components/AccountMenu/Authentication.tsx
+++ b/app/assets/javascripts/components/AccountMenu/Authentication.tsx
@@ -5,14 +5,14 @@ import {
STRING_GENERATING_REGISTER_KEYS,
STRING_NON_MATCHING_PASSWORDS
} from '@/strings';
-import { JSXInternal } from '@node_modules/preact/src/jsx';
+import { JSXInternal } from 'preact/src/jsx';
import TargetedEvent = JSXInternal.TargetedEvent;
import TargetedKeyboardEvent = JSXInternal.TargetedKeyboardEvent;
import { WebApplication } from '@/ui_models/application';
import { StateUpdater, useEffect, useRef, useState } from 'preact/hooks';
import TargetedMouseEvent = JSXInternal.TargetedMouseEvent;
-import { User } from '@node_modules/@standardnotes/snjs/dist/@types/services/api/responses';
-import { FC } from 'react';
+import { FunctionalComponent } from 'preact';
+import { User } from '@standardnotes/snjs/dist/@types/services/api/responses';
type Props = {
application: WebApplication;
@@ -27,18 +27,18 @@ type Props = {
user: User | undefined;
}
-const Authentication: FC = ({
- application,
- server,
- setServer,
- closeAccountMenu,
- notesAndTagsCount,
- showLogin,
- setShowLogin,
- showRegister,
- setShowRegister,
- user
- }: Props) => {
+const Authentication: FunctionalComponent = ({
+ application,
+ server,
+ setServer,
+ closeAccountMenu,
+ notesAndTagsCount,
+ showLogin,
+ setShowLogin,
+ showRegister,
+ setShowRegister,
+ user
+ }: Props) => {
const [showAdvanced, setShowAdvanced] = useState(false);
const [isAuthenticating, setIsAuthenticating] = useState(false);
@@ -69,7 +69,6 @@ const Authentication: FC = ({
const handleHostInputChange = (event: TargetedEvent) => {
const { value } = event.target as HTMLInputElement;
- // setUrl(value);
setServer(value);
application.setHost(value);
};
@@ -243,42 +242,48 @@ const Authentication: FC = ({
);
-}
+};
export default Encryption;
diff --git a/app/assets/javascripts/components/AccountMenu/ErrorReporting.tsx b/app/assets/javascripts/components/AccountMenu/ErrorReporting.tsx
index 65fbee6fc..cfb616af6 100644
--- a/app/assets/javascripts/components/AccountMenu/ErrorReporting.tsx
+++ b/app/assets/javascripts/components/AccountMenu/ErrorReporting.tsx
@@ -1,4 +1,4 @@
-import { useState } from '@node_modules/preact/hooks';
+import { useState } from 'preact/hooks';
import { storage, StorageKey } from '@Services/localStorage';
import { disableErrorReporting, enableErrorReporting, errorReportingId } from '@Services/errorReporting';
import { alertDialog } from '@Services/alertService';
diff --git a/app/assets/javascripts/components/AccountMenu/Footer.tsx b/app/assets/javascripts/components/AccountMenu/Footer.tsx
index 11705f9c2..b9f86a4cb 100644
--- a/app/assets/javascripts/components/AccountMenu/Footer.tsx
+++ b/app/assets/javascripts/components/AccountMenu/Footer.tsx
@@ -1,9 +1,8 @@
-import { FunctionalComponent } from 'preact';
import { AppState } from '@/ui_models/app_state';
-import { StateUpdater, useState } from '@node_modules/preact/hooks';
+import { StateUpdater, useState } from 'preact/hooks';
import { WebApplication } from '@/ui_models/application';
-import { User } from '@node_modules/@standardnotes/snjs/dist/@types/services/api/responses';
-import { observer } from '@node_modules/mobx-react-lite';
+import { User } from '@standardnotes/snjs/dist/@types/services/api/responses';
+import { observer } from 'mobx-react-lite';
type Props = {
appState: AppState;
diff --git a/app/assets/javascripts/components/AccountMenu/PasscodeLock.tsx b/app/assets/javascripts/components/AccountMenu/PasscodeLock.tsx
index ae291e7ba..9f8d29d77 100644
--- a/app/assets/javascripts/components/AccountMenu/PasscodeLock.tsx
+++ b/app/assets/javascripts/components/AccountMenu/PasscodeLock.tsx
@@ -1,4 +1,3 @@
-import { FC } from 'react';
import {
STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_CHANGE,
STRING_CONFIRM_APP_QUIT_DURING_PASSCODE_REMOVAL, STRING_E2E_ENABLED, STRING_ENC_NOT_ENABLED, STRING_LOCAL_ENC_ENABLED,
@@ -7,13 +6,14 @@ import {
} from '@/strings';
import { WebApplication } from '@/ui_models/application';
import { preventRefreshing } from '@/utils';
-import { JSXInternal } from '@node_modules/preact/src/jsx';
+import { JSXInternal } from 'preact/src/jsx';
import TargetedEvent = JSXInternal.TargetedEvent;
import { alertDialog } from '@Services/alertService';
-import { useCallback, useEffect, useRef, useState } from '@node_modules/preact/hooks';
-import { ApplicationEvent } from '@node_modules/@standardnotes/snjs';
+import { useCallback, useEffect, useRef, useState } from 'preact/hooks';
+import { ApplicationEvent } from '@standardnotes/snjs';
import TargetedMouseEvent = JSXInternal.TargetedMouseEvent;
import { StateUpdater } from 'preact/hooks';
+import { FunctionalComponent } from 'preact';
type Props = {
application: WebApplication;
@@ -22,7 +22,7 @@ type Props = {
setIsBackupEncrypted: StateUpdater;
};
-const PasscodeLock: FC = ({
+const PasscodeLock: FunctionalComponent = ({
application,
setEncryptionStatusString,
setIsEncryptionEnabled,
diff --git a/app/assets/javascripts/components/AccountMenu/Protections.tsx b/app/assets/javascripts/components/AccountMenu/Protections.tsx
index fc472549c..f48b02918 100644
--- a/app/assets/javascripts/components/AccountMenu/Protections.tsx
+++ b/app/assets/javascripts/components/AccountMenu/Protections.tsx
@@ -1,15 +1,15 @@
import { WebApplication } from '@/ui_models/application';
-import { FC } from 'react';
+import { FunctionalComponent } from 'preact';
type Props = {
application: WebApplication;
protectionsDisabledUntil: string | null;
};
-const Protections: FC = ({
- application,
- protectionsDisabledUntil
- }) => {
+const Protections: FunctionalComponent = ({
+ application,
+ protectionsDisabledUntil
+ }) => {
const enableProtections = () => {
application.clearProtectionSession();
};
@@ -41,6 +41,6 @@ const Protections: FC = ({
)}
);
-}
+};
export default Protections;
diff --git a/app/assets/javascripts/components/AccountMenu/index.tsx b/app/assets/javascripts/components/AccountMenu/index.tsx
index 7a3006fd0..694d8cbab 100644
--- a/app/assets/javascripts/components/AccountMenu/index.tsx
+++ b/app/assets/javascripts/components/AccountMenu/index.tsx
@@ -4,7 +4,7 @@ import { AppState } from '@/ui_models/app_state';
import { WebApplication } from '@/ui_models/application';
import { useEffect, useState } from 'preact/hooks';
import { isSameDay } from '@/utils';
-import { ApplicationEvent } from '@node_modules/@standardnotes/snjs';
+import { ApplicationEvent } from '@standardnotes/snjs';
import { ConfirmSignoutContainer } from '@/components/ConfirmSignoutModal';
import Authentication from '@/components/AccountMenu/Authentication';
import Footer from '@/components/AccountMenu/Footer';
@@ -14,7 +14,7 @@ import Protections from '@/components/AccountMenu/Protections';
import PasscodeLock from '@/components/AccountMenu/PasscodeLock';
import DataBackup from '@/components/AccountMenu/DataBackup';
import ErrorReporting from '@/components/AccountMenu/ErrorReporting';
-import { useCallback } from '@node_modules/preact/hooks';
+import { useCallback } from 'preact/hooks';
type Props = {
appState: AppState;
diff --git a/app/assets/javascripts/components/Icon.tsx b/app/assets/javascripts/components/Icon.tsx
index 78a874ab4..67c0aa592 100644
--- a/app/assets/javascripts/components/Icon.tsx
+++ b/app/assets/javascripts/components/Icon.tsx
@@ -14,6 +14,7 @@ import TrashSweepIcon from '../../icons/ic-trash-sweep.svg';
import MoreIcon from '../../icons/ic-more.svg';
import TuneIcon from '../../icons/ic-tune.svg';
import { toDirective } from './utils';
+import { FunctionalComponent } from 'preact';
const ICONS = {
'pencil-off': PencilOffIcon,
@@ -38,7 +39,7 @@ type Props = {
className: string;
}
-export const Icon: React.FC = ({ type, className }) => {
+export const Icon: FunctionalComponent = ({ type, className }) => {
const IconComponent = ICONS[type];
return ;
};
diff --git a/app/assets/javascripts/ui_models/app_state/account_menu_state.ts b/app/assets/javascripts/ui_models/app_state/account_menu_state.ts
index 1c0a9acae..0e492a09b 100644
--- a/app/assets/javascripts/ui_models/app_state/account_menu_state.ts
+++ b/app/assets/javascripts/ui_models/app_state/account_menu_state.ts
@@ -1,7 +1,7 @@
import { action, computed, makeObservable, observable, runInAction } from 'mobx';
-import { ContentType } from '@node_modules/@standardnotes/snjs';
+import { ContentType } from '@standardnotes/snjs';
import { WebApplication } from '@/ui_models/application';
-import { SNItem } from '@node_modules/@standardnotes/snjs/dist/@types/models/core/item';
+import { SNItem } from '@standardnotes/snjs/dist/@types/models/core/item';
export class AccountMenuState {
show = false;