Skip to content

Commit

Permalink
run eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tore Simonsen committed Oct 15, 2024
1 parent 8911792 commit aeb45ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 1 addition & 5 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ import { logger } from "matrix-js-sdk/src/logger";
import { throttle } from "lodash";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";

// what-input helps improve keyboard accessibility
import "what-input";
import {
CustomComponentLifecycle,
CustomComponentOpts,
} from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle";

import type NewRecoveryMethodDialog from "../../async-components/views/dialogs/security/NewRecoveryMethodDialog";
import type RecoveryMethodRemovedDialog from "../../async-components/views/dialogs/security/RecoveryMethodRemovedDialog";
import PosthogTrackers from "../../PosthogTrackers";
Expand Down
19 changes: 10 additions & 9 deletions src/components/views/dialogs/InviteDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ import { RoomMember, Room, MatrixError, EventType } from "matrix-js-sdk/src/matr
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import { logger } from "matrix-js-sdk/src/logger";
import { uniqBy } from "lodash";
import {
CustomComponentLifecycle,
CustomComponentOpts,
} from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle";
import { KnownMembership } from "matrix-js-sdk/src/types";

import { Icon as InfoIcon } from "../../../../res/img/element-icons/info.svg";
import { Icon as EmailPillAvatarIcon } from "../../../../res/img/icon-email-pill-avatar.svg";
import { _t, _td } from "../../../languageHandler";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import { makeRoomPermalink, makeUserPermalink } from "../../../utils/permalinks/Permalinks";
import DMRoomMap from "../../../utils/DMRoomMap";
import SdkConfig from "../../../SdkConfig";
// import SdkConfig from "../../../SdkConfig";
import * as Email from "../../../email";
import { getDefaultIdentityServerUrl, setToDefaultIdentityServer } from "../../../utils/IdentityServerUtils";
import { buildActivityScores, buildMemberScores, compareMembers } from "../../../utils/SortMembers";
Expand Down Expand Up @@ -74,7 +79,6 @@ import { UNKNOWN_PROFILE_ERRORS } from "../../../utils/MultiInviter";
import AskInviteAnywayDialog, { UnknownProfiles } from "./AskInviteAnywayDialog";
import { SdkContextClass } from "../../../contexts/SDKContext";
import { UserProfilesStore } from "../../../stores/UserProfilesStore";
import { CustomComponentLifecycle, CustomComponentOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/CustomComponentLifecycle";
import { ModuleRunner } from "../../../modules/ModuleRunner";

// we have a number of types defined from the Matrix spec which can't reasonably be altered here.
Expand Down Expand Up @@ -371,8 +375,8 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
this.profilesStore = SdkContextClass.instance.userProfilesStore;

const excludedIds = new Set([MatrixClientPeg.safeGet().getUserId()!]);
const welcomeUserId = SdkConfig.get("welcome_user_id");
if (welcomeUserId) excludedIds.add(welcomeUserId);
// const welcomeUserId = SdkConfig.get("welcome_user_id");
// if (welcomeUserId) excludedIds.add(welcomeUserId);

if (isRoomInvite(props)) {
const room = MatrixClientPeg.safeGet().getRoom(props.roomId);
Expand Down Expand Up @@ -1560,10 +1564,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
}
const customInviteDialog = { CustomComponent: React.Fragment };
const Props = (props: any): React.JSX.Element => <></>;
ModuleRunner.instance.invoke(
CustomComponentLifecycle.InviteDialog,
customInviteDialog as CustomComponentOpts,
);
ModuleRunner.instance.invoke(CustomComponentLifecycle.InviteDialog, customInviteDialog as CustomComponentOpts);

Check failure on line 1567 in src/components/views/dialogs/InviteDialog.tsx

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Property 'InviteDialog' does not exist on type 'typeof CustomComponentLifecycle'.
return (
<customInviteDialog.CustomComponent>
{/* VERJI: Workaround, pass needed props in a child element of the customComponent wrapper, so we can extract in module implementation */}
Expand All @@ -1584,4 +1585,4 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
</customInviteDialog.CustomComponent>
);
}
}
}

0 comments on commit aeb45ea

Please sign in to comment.