Migrate to stylistic
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -8,6 +8,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
|
||||
import WarningSvg from "../../../../res/img/warning.svg";
|
||||
|
||||
interface IProps {
|
||||
errorMsg?: string;
|
||||
}
|
||||
@@ -16,7 +18,7 @@ const AppWarning: React.FC<IProps> = (props) => {
|
||||
return (
|
||||
<div className="mx_AppWarning">
|
||||
<div>
|
||||
<img src={require("../../../../res/img/warning.svg").default} alt="" />
|
||||
<img src={WarningSvg} alt="" />
|
||||
</div>
|
||||
<div>
|
||||
<span>{props.errorMsg || "Error"}</span>
|
||||
|
||||
@@ -140,7 +140,7 @@ export default class ReplyChain extends React.Component<IProps, IState> {
|
||||
const inReplyToEventId = getParentEventId(ev);
|
||||
if (!inReplyToEventId) return null;
|
||||
return await this.getEvent(inReplyToEventId);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ export default class ReplyChain extends React.Component<IProps, IState> {
|
||||
// ask the client to fetch the event we want using the context API, only interface to do so is to ask
|
||||
// for a timeline with that event, but once it is loaded we can use findEventById to look up the ev map
|
||||
await this.matrixClient.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// if it fails catch the error and return early, there's no point trying to find the event in this case.
|
||||
// Return null as it is falsy and thus should be treated as an error (as the event cannot be resolved).
|
||||
return null;
|
||||
|
||||
@@ -33,6 +33,7 @@ interface ISSOButtonProps extends IProps {
|
||||
|
||||
const getIcon = (brand: IdentityProviderBrand | string): string | null => {
|
||||
switch (brand) {
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
case IdentityProviderBrand.Apple:
|
||||
return require(`../../../../res/img/element-icons/brands/apple.svg`).default;
|
||||
case IdentityProviderBrand.Facebook:
|
||||
@@ -47,6 +48,7 @@ const getIcon = (brand: IdentityProviderBrand | string): string | null => {
|
||||
return require(`../../../../res/img/element-icons/brands/twitter.svg`).default;
|
||||
default:
|
||||
return null;
|
||||
/* eslint-enable @typescript-eslint/no-require-imports */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user