/* ============================================================================
* Copyright (c) Cloud Annotations
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* ========================================================================== */
import React, { useState } from "react";
// @ts-ignore
import MagicDropzone from "react-magic-dropzone";
import FloatingButton from "../FloatingButton";
import styles from "./styles.module.css";
type PreviewFile = { preview: string } & File;
interface RenderPreviewProps {
file: PreviewFile;
}
function RenderPreview({ file }: RenderPreviewProps) {
switch (file.type) {
case "image/png":
case "image/jpeg":
case "image/jpg":
case "image/svg+xml":
return (
);
default:
return (