From bbbcfd54d66bafa45b33ccc2acadf46b77ad8d3a Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 17 Jun 2021 16:51:59 +1000 Subject: [PATCH] rename all spacer-* to react component --- js/views/app_view.js | 2 +- stylesheets/_session.scss | 12 ------ ts/components/EditProfileDialog.tsx | 7 ++-- ts/components/LeftPane.tsx | 4 +- ts/components/MainViewController.tsx | 2 +- ts/components/UserDetailsDialog.tsx | 14 ++++--- .../AdminLeaveClosedGroupDialog.tsx | 29 +++++--------- .../conversation/InviteContactsDialog.tsx | 9 +++-- .../conversation/UpdateGroupMembersDialog.tsx | 15 ++++---- .../conversation/UpdateGroupNameDialog.tsx | 14 +++---- .../session/LeftPaneMessageSection.tsx | 12 +++--- .../session/LeftPaneSettingSection.tsx | 38 ++++++++----------- ts/components/session/SessionConfirm.tsx | 26 ++++++------- .../session/SessionIDResetDialog.tsx | 9 +++-- .../session/SessionNicknameDialog.tsx | 3 +- .../session/SessionPasswordModal.tsx | 7 ++-- ts/components/session/SessionSeedModal.tsx | 13 ++++--- ts/components/session/SessionToggle.tsx | 4 +- ts/components/session/SessionWrapperModal.tsx | 34 ++++++++--------- .../conversation/SessionMessagesList.tsx | 2 +- .../conversation/SessionRightPanel.tsx | 8 ++-- .../settings/SessionSettingListItem.tsx | 2 +- .../session/settings/SessionSettings.tsx | 5 +-- ts/state/actions.ts | 4 +- ts/state/ducks/modalDialog.tsx | 10 ++--- ts/state/smart/SessionConversation.tsx | 4 +- ts/util/attachmentsUtil.ts | 3 +- 27 files changed, 131 insertions(+), 161 deletions(-) diff --git a/js/views/app_view.js b/js/views/app_view.js index f26694697..dfffd21df 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -1,4 +1,4 @@ -/* global Backbone, i18n, Whisper, storage, _, $ */ +/* global Backbone, Whisper, storage, _, $ */ /* eslint-disable more/no-then */ diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 1570ac049..261a7e36d 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -1,13 +1,3 @@ -div.spacer-sm { - height: $session-margin-sm; -} -div.spacer-md { - height: $session-margin-md; -} -div.spacer-lg { - height: $session-margin-lg; -} - .subtle { opacity: $session-subtle-factor; } @@ -1199,7 +1189,6 @@ input { } } - .onion__description { min-width: 100%; width: 0; @@ -1227,7 +1216,6 @@ input { } } - .session-nickname-wrapper { position: absolute; height: 100%; diff --git a/ts/components/EditProfileDialog.tsx b/ts/components/EditProfileDialog.tsx index 3a10ce3cd..9da5dd090 100644 --- a/ts/components/EditProfileDialog.tsx +++ b/ts/components/EditProfileDialog.tsx @@ -17,6 +17,7 @@ import { ConversationTypeEnum } from '../models/conversation'; import { SessionWrapperModal } from './session/SessionWrapperModal'; import { AttachmentUtil } from '../util'; import { ConversationController } from '../session/conversations'; +import { SpacerLG, SpacerMD } from './basic/Text'; interface Props { profileName?: string; @@ -128,7 +129,7 @@ export class EditProfileDialog extends React.Component { showExitIcon={true} theme={this.props.theme} > -
+ {viewQR && this.renderQRView(sessionID)} {viewDefault && this.renderDefaultView()} @@ -140,7 +141,7 @@ export class EditProfileDialog extends React.Component { {sessionID}

-
+ {viewDefault || viewQR ? ( @@ -164,7 +165,7 @@ export class EditProfileDialog extends React.Component { ) )} -
+
diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index c5fc26367..485eb3d68 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -86,7 +86,7 @@ const InnerLeftPaneContactSection = () => { ); }; -const LeftPaneSection = (props: { isExpired: boolean, setModal: any}) => { +const LeftPaneSection = (props: { isExpired: boolean; setModal: any }) => { const focusedSection = useSelector(getFocusedSection); const { setModal } = props; @@ -110,7 +110,7 @@ export const LeftPane = (props: Props) => { return ( <> - { modal ? modal : null} + {modal ? modal : null}
diff --git a/ts/components/MainViewController.tsx b/ts/components/MainViewController.tsx index 9e2bcbad0..9c222c93f 100644 --- a/ts/components/MainViewController.tsx +++ b/ts/components/MainViewController.tsx @@ -38,7 +38,7 @@ export class MessageView extends React.Component { */ async function createClosedGroup( groupName: string, - groupMembers: Array, + groupMembers: Array ): Promise { // Validate groupName and groupMembers length if (groupName.length === 0) { diff --git a/ts/components/UserDetailsDialog.tsx b/ts/components/UserDetailsDialog.tsx index 2501db815..ace96ca21 100644 --- a/ts/components/UserDetailsDialog.tsx +++ b/ts/components/UserDetailsDialog.tsx @@ -9,6 +9,7 @@ import { ConversationController } from '../session/conversations'; import { ConversationTypeEnum } from '../models/conversation'; import { Session } from 'electron'; import { SessionWrapperModal } from './session/SessionWrapperModal'; +import { SpacerMD } from './basic/Text'; interface Props { i18n: any; @@ -48,7 +49,7 @@ export class UserDetailsDialog extends React.Component {
{this.renderAvatar()}
-
+
@@ -86,7 +87,7 @@ export class UserDetailsDialog extends React.Component { private onKeyUp(event: any) { switch (event.key) { case 'Enter': - this.onClickStartConversation(); + void this.onClickStartConversation(); break; case 'Esc': case 'Escape': @@ -103,12 +104,13 @@ export class UserDetailsDialog extends React.Component { private async onClickStartConversation() { // this.props.onStartConversation(); - const conversation = await ConversationController.getInstance().getOrCreateAndWait(this.props.pubkey, ConversationTypeEnum.PRIVATE); - - window.inboxStore?.dispatch( - window.actionsCreators.openConversationExternal(conversation.id) + const conversation = await ConversationController.getInstance().getOrCreateAndWait( + this.props.pubkey, + ConversationTypeEnum.PRIVATE ); + window.inboxStore?.dispatch(window.actionsCreators.openConversationExternal(conversation.id)); + this.closeDialog(); } } diff --git a/ts/components/conversation/AdminLeaveClosedGroupDialog.tsx b/ts/components/conversation/AdminLeaveClosedGroupDialog.tsx index fd0f09ee2..194bdf954 100644 --- a/ts/components/conversation/AdminLeaveClosedGroupDialog.tsx +++ b/ts/components/conversation/AdminLeaveClosedGroupDialog.tsx @@ -1,19 +1,18 @@ import React from 'react'; -import { SessionModal } from '../session/SessionModal'; import { SessionButton, SessionButtonColor } from '../session/SessionButton'; -import { DefaultTheme, useTheme } from 'styled-components'; +import { DefaultTheme } from 'styled-components'; import { SessionWrapperModal } from '../session/SessionWrapperModal'; +import { SpacerLG } from '../basic/Text'; -interface Props { +type Props = { groupName: string; onSubmit: () => any; onClose: any; theme: DefaultTheme; -} +}; const AdminLeaveClosedGroupDialogInner = (props: Props) => { - const { groupName, theme, onSubmit, onClose } = props; const titleText = `${window.i18n('leaveGroup')} ${groupName}`; @@ -24,31 +23,23 @@ const AdminLeaveClosedGroupDialogInner = (props: Props) => { const onClickOK = () => { void onSubmit(); closeDialog(); - } + }; const closeDialog = () => { onClose(); - } + }; return ( - -
+

{warningAsAdmin}

- - + +
); -} +}; export const AdminLeaveClosedGroupDialog = AdminLeaveClosedGroupDialogInner; diff --git a/ts/components/conversation/InviteContactsDialog.tsx b/ts/components/conversation/InviteContactsDialog.tsx index 7c89e6f67..6e92c4cbf 100644 --- a/ts/components/conversation/InviteContactsDialog.tsx +++ b/ts/components/conversation/InviteContactsDialog.tsx @@ -12,6 +12,7 @@ import { getCompleteUrlForV2ConvoId } from '../../interactions/conversation'; import _ from 'lodash'; import { VALIDATION } from '../../session/constants'; import { SessionWrapperModal } from '../session/SessionWrapperModal'; +import { SpacerLG } from '../basic/Text'; type Props = { // contactList: Array; @@ -202,18 +203,18 @@ const InviteContactsDialogInner = (props: Props) => { return ( -
+
{renderMemberList()}
{hasContacts ? null : ( <> -
+

{window.i18n('noContactsToAdd')}

-
+ )} -
+
diff --git a/ts/components/conversation/UpdateGroupMembersDialog.tsx b/ts/components/conversation/UpdateGroupMembersDialog.tsx index 7cf61b763..f081e1ddb 100644 --- a/ts/components/conversation/UpdateGroupMembersDialog.tsx +++ b/ts/components/conversation/UpdateGroupMembersDialog.tsx @@ -10,7 +10,7 @@ import autoBind from 'auto-bind'; import { ConversationController } from '../../session/conversations'; import _ from 'lodash'; -import { Text } from '../basic/Text'; +import { SpacerLG, SpacerMD, Text } from '../basic/Text'; import { SessionWrapperModal } from '../session/SessionWrapperModal'; interface Props { @@ -50,8 +50,8 @@ export class UpdateGroupMembersDialog extends React.Component { const name = nickname ? nickname : lokiProfile - ? lokiProfile.displayName - : window.i18n('anonymous'); + ? lokiProfile.displayName + : window.i18n('anonymous'); const existingMember = this.props.existingMembers.includes(d.id); @@ -130,16 +130,16 @@ export class UpdateGroupMembersDialog extends React.Component { onClose={() => this.closeDialog()} theme={this.props.theme} > -
+

{errorMsg}

-
+
{this.renderMemberList()}
{this.renderZombiesList()} {showNoMembersMessage &&

{window.i18n('noMembersInThisGroup')}

} -
+
@@ -200,7 +200,7 @@ export class UpdateGroupMembersDialog extends React.Component { }); return ( <> -
+ {isAdmin && ( { } } - // Return members that would comprise the group given the // current state in `users` private getWouldBeMembers(users: Array) { diff --git a/ts/components/conversation/UpdateGroupNameDialog.tsx b/ts/components/conversation/UpdateGroupNameDialog.tsx index 619c6d6f0..0108b58a0 100644 --- a/ts/components/conversation/UpdateGroupNameDialog.tsx +++ b/ts/components/conversation/UpdateGroupNameDialog.tsx @@ -6,6 +6,7 @@ import { SessionButton, SessionButtonColor } from '../session/SessionButton'; import { Avatar, AvatarSize } from '../Avatar'; import { DefaultTheme, withTheme } from 'styled-components'; import { SessionWrapperModal } from '../session/SessionWrapperModal'; +import { SpacerMD } from '../basic/Text'; interface Props { titleText: string; @@ -85,19 +86,16 @@ class UpdateGroupNameDialogInner extends React.Component { onClose={() => this.closeDialog()} theme={this.props.theme} > - - { this.state.errorDisplayed ? + {this.state.errorDisplayed ? ( <> -
+

{errorMsg}

-
+ - : - null - } + ) : null} {this.renderAvatar()} -
+ { loading: false, overlay: false, valuePasted: '', - modal: null + modal: null, }; autoBind(this); @@ -169,17 +169,15 @@ export class LeftPaneMessageSection extends React.Component { return (
{this.renderHeader()} - { this.state.modal ? this.state.modal : null } + {this.state.modal ? this.state.modal : null} {overlay ? this.renderClosableOverlay(overlay) : this.renderConversations()}
); } - - - public setModal (modal: null | JSX.Element) { + public setModal(modal: null | JSX.Element) { this.setState({ - modal + modal, }); } diff --git a/ts/components/session/LeftPaneSettingSection.tsx b/ts/components/session/LeftPaneSettingSection.tsx index 2d9ae2063..2b17d83dc 100644 --- a/ts/components/session/LeftPaneSettingSection.tsx +++ b/ts/components/session/LeftPaneSettingSection.tsx @@ -104,42 +104,34 @@ const LeftPaneSettingsCategories = () => { ); }; -const onDeleteAccount = ( setModal: any) => { +const onDeleteAccount = (setModal: any) => { const title = window.i18n('clearAllData'); const message = window.i18n('deleteAccountWarning'); const clearModal = () => { setModal(null); - } + }; setModal( - ) + + ); }; const onShowRecoverPhrase = (setModal: any) => { - const clearModal = () => { setModal(null); - } - - setModal( + }; - - - ) - - -} + setModal(); +}; -const LeftPaneBottomButtons = (props: { setModal: any}) => { +const LeftPaneBottomButtons = (props: { setModal: any }) => { const dangerButtonText = window.i18n('clearAllData'); const showRecoveryPhrase = window.i18n('showRecoveryPhrase'); const { setModal } = props; @@ -163,7 +155,7 @@ const LeftPaneBottomButtons = (props: { setModal: any}) => { ); }; -export const LeftPaneSettingSection = (props: { setModal: any}) => { +export const LeftPaneSettingSection = (props: { setModal: any }) => { const theme = useSelector(getTheme); const { setModal } = props; diff --git a/ts/components/session/SessionConfirm.tsx b/ts/components/session/SessionConfirm.tsx index 466f591bd..9296475ab 100644 --- a/ts/components/session/SessionConfirm.tsx +++ b/ts/components/session/SessionConfirm.tsx @@ -8,6 +8,7 @@ import { SessionWrapperModal } from './SessionWrapperModal'; import { useDispatch } from 'react-redux'; import { updateConfirmModal } from '../../state/ducks/modalDialog'; import { update } from 'lodash'; +import { SpacerLG } from '../basic/Text'; export interface SessionConfirmDialogProps { message?: string; @@ -27,7 +28,7 @@ export interface SessionConfirmDialogProps { theme?: DefaultTheme; closeAfterClickOk?: boolean; shouldShowConfirm?: () => boolean | undefined; -}; +} const SessionConfirmInner = (props: SessionConfirmDialogProps) => { const { @@ -55,7 +56,7 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => { const messageSubText = messageSub ? 'session-confirm-main-message' : 'subtle'; /** - * Calls close function after the ok button is clicked. If no close method specified, closes the modal + * Calls close function after the ok button is clicked. If no close method specified, closes the modal */ const onClickOkWithClose = () => { if (onClickOk) { @@ -65,17 +66,15 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => { if (onClickClose) { onClickClose(); } - } - + }; const onClickOkHandler = () => { if (onClickOk) { onClickOk(); } - window.inboxStore?.dispatch(updateConfirmModal(null)); - } + }; if (shouldShowConfirm && !shouldShowConfirm()) { return null; @@ -87,8 +86,7 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => { } window.inboxStore?.dispatch(updateConfirmModal(null)); - } - + }; return ( { showHeader={showHeader} theme={theme} > - - {!showHeader &&
} + {!showHeader && }
{sessionIcon && iconSize && ( <> -
+ )} @@ -123,10 +120,13 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => { {!hideCancel && ( // - + )}
- ); }; diff --git a/ts/components/session/SessionIDResetDialog.tsx b/ts/components/session/SessionIDResetDialog.tsx index f5a2d36be..328d2ffb5 100644 --- a/ts/components/session/SessionIDResetDialog.tsx +++ b/ts/components/session/SessionIDResetDialog.tsx @@ -5,6 +5,7 @@ import { SessionButton, SessionButtonColor } from './SessionButton'; import { DefaultTheme, withTheme } from 'styled-components'; import { SessionIcon, SessionIconSize, SessionIconType } from './icon'; import { deleteAccount } from '../../util/accountManager'; +import { SpacerLG, SpacerSM, SpacerXS } from '../basic/Text'; type Props = { onClose: any; @@ -19,19 +20,19 @@ const SessionIDResetDialogInner = (props: Props) => { return ( null} theme={props.theme}> -
+
-
+ {description} -
+
-
+
{ >
{window.i18n('changeNicknameMessage')} -
+
{ onClose={this.closeDialog} theme={this.props.theme} > -
+
{ )}
-
+ {this.showError()}
@@ -142,7 +143,7 @@ class SessionPasswordModalInner extends React.Component { {message && ( <>
{message}
-
+ )} diff --git a/ts/components/session/SessionSeedModal.tsx b/ts/components/session/SessionSeedModal.tsx index 44d0846cc..9d9d486c4 100644 --- a/ts/components/session/SessionSeedModal.tsx +++ b/ts/components/session/SessionSeedModal.tsx @@ -9,6 +9,7 @@ import { getPasswordHash } from '../../data/data'; import { QRCode } from 'react-qr-svg'; import { mn_decode } from '../../session/crypto/mnemonic'; import { SessionWrapperModal } from './SessionWrapperModal'; +import { SpacerLG, SpacerSM, SpacerXS } from '../basic/Text'; interface Props { onClose: any; @@ -68,7 +69,7 @@ class SessionSeedModalInner extends React.Component { onClose={onClose} theme={this.props.theme} > -
+ {hasPassword && !passwordValid ? ( <>{this.renderPasswordView()} @@ -98,12 +99,12 @@ class SessionSeedModalInner extends React.Component { {error && ( <> -
+
{error}
)} -
+
@@ -125,15 +126,15 @@ class SessionSeedModalInner extends React.Component { <>

{i18n('recoveryPhraseSavePromptMain')}

-
+ {this.state.recoveryPhrase}
-
+
-
+
{ // If item needs a confirmation dialog to turn ON, render it const closeConfirmModal = () => { this.props.updateConfirmModal(null); - } + }; this.props.updateConfirmModal({ onClickOk: () => { @@ -83,7 +83,7 @@ export class SessionToggle extends React.PureComponent { }, ...this.props.confirmationDialogParams, updateConfirmModal, - }) + }); return; } diff --git a/ts/components/session/SessionWrapperModal.tsx b/ts/components/session/SessionWrapperModal.tsx index 8a558e9e9..14ea480e1 100644 --- a/ts/components/session/SessionWrapperModal.tsx +++ b/ts/components/session/SessionWrapperModal.tsx @@ -33,7 +33,7 @@ export type SessionWrapperModalType = { showHeader?: boolean; onConfirm?: () => void; onClose?: () => void; - showClose?: boolean + showClose?: boolean; confirmText?: string; cancelText?: string; showExitIcon?: boolean; @@ -55,7 +55,7 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => { showExitIcon, theme, headerIconButtons, - headerReverse + headerReverse, } = props; useEffect(() => { @@ -78,8 +78,7 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
- - {showHeader ? + {showHeader ? (
{showExitIcon ? ( @@ -95,40 +94,37 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
{headerIconButtons ? headerIconButtons.map((iconItem: any) => { - return ( - - ); - }) + return ( + + ); + }) : null}
- : null} + ) : null}
{props.children}
- {onConfirm ? ( {confirmText || window.i18n('ok')} ) : null} - {onClose && showClose ? ( {cancelText || window.i18n('close')} ) : null} -
diff --git a/ts/components/session/conversation/SessionMessagesList.tsx b/ts/components/session/conversation/SessionMessagesList.tsx index dd8bb35e5..4492c6353 100644 --- a/ts/components/session/conversation/SessionMessagesList.tsx +++ b/ts/components/session/conversation/SessionMessagesList.tsx @@ -346,7 +346,7 @@ export class SessionMessagesList extends React.Component { }; } - messageProps.updateSessionConversationModal = this.props.updateSessionConversationModal + messageProps.updateSessionConversationModal = this.props.updateSessionConversationModal; return ; } diff --git a/ts/components/session/conversation/SessionRightPanel.tsx b/ts/components/session/conversation/SessionRightPanel.tsx index 7e13aac10..a7119594b 100644 --- a/ts/components/session/conversation/SessionRightPanel.tsx +++ b/ts/components/session/conversation/SessionRightPanel.tsx @@ -246,10 +246,10 @@ class SessionRightPanel extends React.Component { const leaveGroupString = isPublic ? window.i18n('leaveGroup') : isKickedFromGroup - ? window.i18n('youGotKickedFromGroup') - : left - ? window.i18n('youLeftTheGroup') - : window.i18n('leaveGroup'); + ? window.i18n('youGotKickedFromGroup') + : left + ? window.i18n('youLeftTheGroup') + : window.i18n('leaveGroup'); const disappearingMessagesOptions = timerOptions.map(option => { return { diff --git a/ts/components/session/settings/SessionSettingListItem.tsx b/ts/components/session/settings/SessionSettingListItem.tsx index 711dd43f0..f205fd487 100644 --- a/ts/components/session/settings/SessionSettingListItem.tsx +++ b/ts/components/session/settings/SessionSettingListItem.tsx @@ -21,7 +21,7 @@ interface Props { confirmationDialogParams?: SessionConfirmDialogProps; // for updating modal in redux - updateConfirmModal?: any + updateConfirmModal?: any; } interface State { diff --git a/ts/components/session/settings/SessionSettings.tsx b/ts/components/session/settings/SessionSettings.tsx index f7e437db6..38c2c4d7e 100644 --- a/ts/components/session/settings/SessionSettings.tsx +++ b/ts/components/session/settings/SessionSettings.tsx @@ -11,7 +11,7 @@ import { ConversationController } from '../../../session/conversations'; import { getConversationLookup } from '../../../state/selectors/conversations'; import { connect } from 'react-redux'; import { getPasswordHash } from '../../../../ts/data/data'; -import { SpacerLG } from '../../basic/Text'; +import { SpacerLG, SpacerXS } from '../../basic/Text'; import { shell } from 'electron'; import { PasswordAction, SessionPasswordModal } from '../SessionPasswordModal'; import { SessionConfirmDialogProps } from '../SessionConfirm'; @@ -173,8 +173,7 @@ class SettingsViewInner extends React.Component {

{window.i18n('password')}

-
- + {this.state.pwdLockError && ( <>
{this.state.pwdLockError}
diff --git a/ts/state/actions.ts b/ts/state/actions.ts index 60ea47a73..cdb018772 100644 --- a/ts/state/actions.ts +++ b/ts/state/actions.ts @@ -5,7 +5,7 @@ import { actions as conversations } from './ducks/conversations'; import { actions as user } from './ducks/user'; import { actions as sections } from './ducks/section'; import { actions as theme } from './ducks/theme'; -import { actions as modalDialog } from './ducks/modalDialog'; +import { actions as modalDialog } from './ducks/modalDialog'; export function mapDispatchToProps(dispatch: Dispatch): Object { return { @@ -16,7 +16,7 @@ export function mapDispatchToProps(dispatch: Dispatch): Object { ...user, ...theme, ...sections, - ...modalDialog + ...modalDialog, }, dispatch ), diff --git a/ts/state/ducks/modalDialog.tsx b/ts/state/ducks/modalDialog.tsx index 2acd8891a..0a3562821 100644 --- a/ts/state/ducks/modalDialog.tsx +++ b/ts/state/ducks/modalDialog.tsx @@ -1,5 +1,5 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit'; -import { SessionConfirmDialogProps } from '../../components/session/SessionConfirm'; +import { SessionConfirmDialogProps } from '../../components/session/SessionConfirm'; export type ConfirmModalState = SessionConfirmDialogProps | null; @@ -12,10 +12,10 @@ const confirmModalSlice = createSlice({ updateConfirmModal(state, action: PayloadAction) { state = action.payload; return action.payload; - } - } -}) + }, + }, +}); export const { actions, reducer } = confirmModalSlice; export const { updateConfirmModal } = actions; -export const confirmModalReducer = reducer; \ No newline at end of file +export const confirmModalReducer = reducer; diff --git a/ts/state/smart/SessionConversation.tsx b/ts/state/smart/SessionConversation.tsx index e39ce97a6..37d4c3ad5 100644 --- a/ts/state/smart/SessionConversation.tsx +++ b/ts/state/smart/SessionConversation.tsx @@ -17,7 +17,9 @@ const mapStateToProps = (state: StateType) => { theme: getTheme(state), messages: getMessagesOfSelectedConversation(state), ourNumber: getOurNumber(state), - confirmModal: (state: StateType) => {state.confirmModal} + confirmModal: (state: StateType) => { + state.confirmModal; + }, }; }; diff --git a/ts/util/attachmentsUtil.ts b/ts/util/attachmentsUtil.ts index edb0d8c80..cb1cc90f3 100644 --- a/ts/util/attachmentsUtil.ts +++ b/ts/util/attachmentsUtil.ts @@ -116,8 +116,7 @@ export type AttachmentFileType = { attachment: any; data: ArrayBuffer; size: number; -} - +}; // export async function readFile(attachment: any): Promise { export async function readFile(attachment: any): Promise {