diff --git a/src/components/common/messaging/attachments/Attachment.tsx b/src/components/common/messaging/attachments/Attachment.tsx
index d3a9980e..ca219c56 100644
--- a/src/components/common/messaging/attachments/Attachment.tsx
+++ b/src/components/common/messaging/attachments/Attachment.tsx
@@ -2,7 +2,6 @@ import { Attachment as AttachmentRJS } from "revolt.js/dist/api/objects";
import styles from "./Attachment.module.scss";
import classNames from "classnames";
-import { Text } from "preact-i18n";
import { useContext, useState } from "preact/hooks";
import { useIntermediate } from "../../../../context/intermediate/Intermediate";
@@ -11,6 +10,7 @@ import { AppContext } from "../../../../context/revoltjs/RevoltClient";
import AttachmentActions from "./AttachmentActions";
import TextFile from "./TextFile";
import { SizedGrid } from "./Grid";
+import Spoiler from "./Spoiler";
interface Props {
attachment: AttachmentRJS;
@@ -24,7 +24,6 @@ export default function Attachment({ attachment, hasContent }: Props) {
const { openScreen } = useIntermediate();
const { filename, metadata } = attachment;
const [spoiler, setSpoiler] = useState(filename.startsWith("SPOILER_"));
- const [loaded, setLoaded] = useState(false);
const url = client.generateFileURL(
attachment,
@@ -36,7 +35,7 @@ export default function Attachment({ attachment, hasContent }: Props) {
case "Image": {
return (
ev.button === 1 && window.open(url, "_blank")
} />
+ { spoiler &&