Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// @flow
import React from "react";
import mime from "mime/lite";
import styled from "react-emotion";
import SupportedFileTypes from "./BottomInfoBar/SupportedFileTypes";
import UploadStatus from "./BottomInfoBar/UploadStatus";
mime.define({ "image/x-icon": ["ico"] }, true);
mime.define({ "image/jpg": ["jpg"] }, true);
mime.define({ "image/vnd.microsoft.icon": ["ico"] }, true);
const BottomInfoBarWrapper = styled("div")({
fontSize: "0.8rem",
position: "sticky",
bottom: 0,
height: 30,
color: "var(--mdc-theme-text-secondary-on-background)",
borderTop: "1px solid var(--mdc-theme-on-background)",
backgroundColor: "var(--mdc-theme-surface)",
width: "100%",
transform: "translateZ(0)",
overflow: "hidden",
display: "flex",
alignItems: "center",
zIndex: 1,
// @flow
import React from "react";
import mime from "mime/lite";
mime.define({ "image/x-icon": ["ico"] }, true);
mime.define({ "image/jpg": ["jpg"] }, true);
mime.define({ "image/vnd.microsoft.icon": ["ico"] }, true);
const getUniqueFileExtensions = accept => {
const exts = {};
accept.forEach(item => {
exts[mime.getExtension(item)] = true;
});
return Object.keys(exts);
};
const SupportedFileTypes = ({ accept }: *) => {
if (!accept) {
return null;
}