forked from abner/for-legacy-web
Make the linter happy.
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user