diff --git a/preload.js b/preload.js index 713733355..9d09c4732 100644 --- a/preload.js +++ b/preload.js @@ -25,8 +25,6 @@ if (config.appInstance) { title += ` - ${config.appInstance}`; } -window.Lodash = require('lodash'); - global.dcodeIO = global.dcodeIO || {}; global.dcodeIO.ByteBuffer = require('bytebuffer'); diff --git a/ts/components/OnionStatusDialog.tsx b/ts/components/OnionStatusDialog.tsx index 9fec3807b..2e15e4876 100644 --- a/ts/components/OnionStatusDialog.tsx +++ b/ts/components/OnionStatusDialog.tsx @@ -46,7 +46,6 @@ const OnionPathModalInner = (props: any) => { label: window.i18n('device'), }, ...onionNodes, - , { label: window.i18n('destination'), }, @@ -63,6 +62,7 @@ const OnionPathModalInner = (props: any) => { glowStartDelay={index} label={snode.label} snode={snode} + key={index} /> ); })} @@ -80,8 +80,6 @@ export type OnionNodeStatusLightType = { /** * Component containing a coloured status light and an adjacent country label. - * @param props - * @returns */ export const OnionNodeStatusLight = (props: OnionNodeStatusLightType): JSX.Element => { const { snode, label, glowStartDelay, glowDuration } = props; @@ -97,7 +95,7 @@ export const OnionNodeStatusLight = (props: OnionNodeStatusLightType): JSX.Eleme glowDuration={glowDuration} glowStartDelay={glowStartDelay} color={theme.colors.accent} - > + /> {labelText ? ( <>
{labelText}
@@ -156,7 +154,7 @@ export const ActionPanelOnionStatusLight = (props: { } else { const onionSnodePath = onionState.snodePath; if (onionState && onionSnodePath && onionSnodePath.length > 0) { - let onionNodeCount = onionSnodePath.length; + const onionNodeCount = onionSnodePath.length; iconColor = onionNodeCount > 2 ? green : onionNodeCount > 1 ? orange : red; } } @@ -175,9 +173,10 @@ export const ActionPanelOnionStatusLight = (props: { export const OnionPathModal = (props: OnionPathModalType) => { const onConfirm = () => { - shell.openExternal('https://getsession.org/faq/#onion-routing'); + void shell.openExternal('https://getsession.org/faq/#onion-routing'); }; return ( + // tslint:disable-next-line: use-simple-attributes { onClose={props.onClose} showExitIcon={true} > - + ); }; diff --git a/ts/components/session/SessionNicknameDialog.tsx b/ts/components/session/SessionNicknameDialog.tsx index 8c539937b..a9b1339a9 100644 --- a/ts/components/session/SessionNicknameDialog.tsx +++ b/ts/components/session/SessionNicknameDialog.tsx @@ -1,8 +1,7 @@ import React, { useState } from 'react'; import { ConversationController } from '../../session/conversations/ConversationController'; -import { SessionModal } from './SessionModal'; import { SessionButton } from './SessionButton'; -import { DefaultTheme, withTheme, useTheme } from 'styled-components'; +import { DefaultTheme, useTheme, withTheme } from 'styled-components'; import _ from 'lodash'; import { SessionWrapperModal } from './SessionWrapperModal'; diff --git a/ts/components/session/conversation/SessionConversation.tsx b/ts/components/session/conversation/SessionConversation.tsx index 32cfd4ffd..c17cf2b93 100644 --- a/ts/components/session/conversation/SessionConversation.tsx +++ b/ts/components/session/conversation/SessionConversation.tsx @@ -651,10 +651,7 @@ export class SessionConversation extends React.Component { }; const onSubmit = async (newMembers: Array) => { - const _ = window.Lodash; - const ourPK = Utils.UserUtils.getOurPubKeyStrFromCache(); - - const allMembersAfterUpdate = window.Lodash.concat(newMembers, [ourPK]); + const allMembersAfterUpdate = _.concat(newMembers, [ourPK]); if (!isAdmin) { window.log.warn('Skipping update of members, we are not the admin');