Make the linter happy.

This commit is contained in:
Paul
2021-08-05 14:47:00 +01:00
parent 1be8bdfa9b
commit 872b710bc4
106 changed files with 1083 additions and 5554 deletions

View File

@@ -1,4 +1,3 @@
import { Reply } from "@styled-icons/boxicons-regular";
import { File } from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite";
import { useHistory } from "react-router-dom";
@@ -13,8 +12,6 @@ import { useLayoutEffect, useState } from "preact/hooks";
import { useRenderState } from "../../../../lib/renderer/Singleton";
import { useClient } from "../../../../context/revoltjs/RevoltClient";
import Markdown from "../../../markdown/Markdown";
import UserShort from "../../user/UserShort";
import { SystemMessage } from "../SystemMessage";
@@ -136,10 +133,6 @@ export const ReplyBase = styled.div<{
`}
`;
const Arrow = styled.div`
`;
export const MessageReply = observer(({ index, channel, id }: Props) => {
const view = useRenderState(channel._id);
if (view?.type !== "RENDER") return null;
@@ -155,7 +148,7 @@ export const MessageReply = observer(({ index, channel, id }: Props) => {
} else {
channel.fetchMessage(id).then(setMessage);
}
}, [view.messages]);
}, [id, channel, view.messages]);
if (!message) {
return (
@@ -204,9 +197,12 @@ export const MessageReply = observer(({ index, channel, id }: Props) => {
{message.attachments && (
<>
<File size={16} />
<em>{message.attachments.length > 1 ?
<Text id="app.main.channel.misc.sent_multiple_files" /> :
<Text id="app.main.channel.misc.sent_file" /> }
<em>
{message.attachments.length > 1 ? (
<Text id="app.main.channel.misc.sent_multiple_files" />
) : (
<Text id="app.main.channel.misc.sent_file" />
)}
</em>
</>
)}
@@ -223,4 +219,4 @@ export const MessageReply = observer(({ index, channel, id }: Props) => {
)}
</ReplyBase>
);
});
});

View File

@@ -60,7 +60,7 @@ export default function TextFile({ attachment }: Props) {
setLoading(false);
});
}
}, [content, loading, status]);
}, [content, loading, status, attachment._id, attachment.size, url]);
return (
<div