refactor: add typescript support to project

This commit is contained in:
HD
2022-06-18 00:54:41 +08:00
parent 7ca0099cb0
commit e67379ece4
14 changed files with 404 additions and 193 deletions
@@ -11,10 +11,12 @@ import Progress from "./Progress";
import { getFileIcon, formatBytes, isImage, getImageSize } from "../../utils";
import IconDownload from "../../../assets/icons/download.svg";
import IconClose from "../../../assets/icons/close.circle.svg";
dayjs.extend(relativeTime);
const isLocalFile = (content) => {
return content && typeof content == "string" && content.startsWith("blob:");
};
export default function FileMessage({
context = "",
to = null,