import React, {useEffect} from "react"; import _ from "lodash"; import {Button as SButton, Image, Modal, ModalActions, ModalContent} from "semantic-ui-react"; function getMediaPathURL(path) { return `/media/${encodeURIComponent(path['path'])}`; } function getDownloadPathURL(path) { return `/download/${encodeURIComponent(path['path'])}`; } function getEpubViewerURL(path) { return `/epub.html?url=${getDownloadPathURL(path)}`; } function getIframeModal(path) { const url = getMediaPathURL(path); return