Make the linter happy.

This commit is contained in:
Paul
2021-08-05 14:47:00 +01:00
parent 5930415c05
commit 55e00bf93f
106 changed files with 1083 additions and 5554 deletions

View File

@@ -5,8 +5,7 @@ import { User } from "revolt.js/dist/maps/Users";
import styled from "styled-components";
import { openContextMenu } from "preact-context-menu";
import { Text } from "preact-i18n";
import { Localizer } from "preact-i18n";
import { Text, Localizer } from "preact-i18n";
import { isTouchscreenDevice } from "../../../lib/isTouchscreenDevice";

View File

@@ -52,20 +52,23 @@ const VoiceIndicator = styled.div<{ status: VoiceStatus }>`
`;
export default observer(
(props: Props & Omit<JSX.SVGAttributes<SVGSVGElement>, keyof Props>) => {
(
props: Props &
Omit<
JSX.SVGAttributes<SVGSVGElement>,
keyof Props | "children" | "as"
>,
) => {
const client = useContext(AppContext);
const {
target,
attachment,
size,
voice,
status,
animate,
mask,
hover,
children,
as,
...svgProps
} = props;
const iconURL =

View File

@@ -31,10 +31,10 @@ export const Username = observer(
}
if (member.roles && member.roles.length > 0) {
let srv = client.servers.get(member._id.server);
const srv = client.servers.get(member._id.server);
if (srv?.roles) {
for (let role of member.roles) {
let c = srv.roles[role].colour;
for (const role of member.roles) {
const c = srv.roles[role].colour;
if (c) {
color = c;
continue;