From b00eb52d358135f963c4144d7f7fe5982ae1661a Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 May 2023 17:31:41 +1000 Subject: [PATCH] fix: pass yarn ready --- ts/components/dialog/EditProfileDialog.tsx | 13 ++++++++++--- ts/components/dialog/EditProfilePictureModal.tsx | 7 +++---- ts/components/dialog/ModalContainer.tsx | 2 +- ts/state/selectors/modal.ts | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 3b5b4e848..d1c1b28fb 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -15,8 +15,12 @@ import { SessionButton, SessionButtonType } from '../basic/SessionButton'; import { SessionSpinner } from '../basic/SessionSpinner'; import { SessionIconButton } from '../icon'; import { sanitizeSessionUsername } from '../../session/utils/String'; -import { useOurConversationUsername } from '../../hooks/useParamSelector'; -import { useOurAvatarPath } from '../../hooks/useParamSelector'; +import { setLastProfileUpdateTimestamp } from '../../util/storage'; +import { ConversationTypeEnum } from '../../models/conversationAttributes'; +import { MAX_USERNAME_BYTES } from '../../session/constants'; +import styled from 'styled-components'; +import { saveQRCode } from '../../util/saveQRCode'; +import { useOurAvatarPath, useOurConversationUsername } from '../../hooks/useParamSelector'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { ConversationTypeEnum } from '../../models/conversationAttributes'; @@ -116,6 +120,7 @@ const ProfileHeader = (props: ProfileHeaderProps): ReactElement => { type ProfileDialogModes = 'default' | 'edit' | 'qr'; +// tslint:disable-next-line: max-func-body-length export const EditProfileDialog = (): ReactElement => { const dispatch = useDispatch(); @@ -177,7 +182,7 @@ export const EditProfileDialog = (): ReactElement => { switch (event.key) { case 'Enter': if (mode === 'edit') { - onClickOK(); + void onClickOK(); } break; case 'Esc': @@ -211,6 +216,8 @@ export const EditProfileDialog = (): ReactElement => { }; return ( + /* The
element has a child element that allows keyboard interaction */ + /* tslint:disable-next-line: react-a11y-event-has-role */
{ return (
@@ -93,7 +92,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => const handleUpload = async () => { setLoading(true); if (newAvatarObjectUrl === avatarPath) { - window.log.debug(`Avatar Object URL has not changed!`); + window.log.debug('Avatar Object URL has not changed!'); return; } @@ -117,7 +116,7 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) => showHeader={true} showExitIcon={true} > -
+
{newAvatarObjectUrl || avatarPath ? (