feat: implement useClient from client controller

This commit is contained in:
Paul Makles
2022-06-28 19:59:58 +01:00
parent ce88fab714
commit 5f2311b09c
72 changed files with 330 additions and 457 deletions

View File

@@ -15,14 +15,14 @@ import { IconButton } from "@revoltchat/ui";
import { determineFileSize } from "../../../../lib/fileSize";
import { AppContext } from "../../../../context/revoltjs/RevoltClient";
import { useClient } from "../../../../controllers/client/ClientController";
interface Props {
attachment: API.File;
}
export default function AttachmentActions({ attachment }: Props) {
const client = useContext(AppContext);
const client = useClient();
const { filename, metadata, size } = attachment;
const url = client.generateFileURL(attachment);