Selaa lähdekoodia

Minor changes

FE_dev
bronjaermin 1 vuosi sitten
vanhempi
commit
be836cfc20
2 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 1
    1
      src/components/UI/CustomModal.js
  2. 4
    2
      src/pages/FilesPage/FileTable.js

+ 1
- 1
src/components/UI/CustomModal.js Näytä tiedosto

p: 4, p: 4,
}; };


const CustomModal = ({ open, onCloseModal, children, classes }) => {
const CustomModal = ({ open = false, onCloseModal, children, classes }) => {
const handleClose = () => onCloseModal(); const handleClose = () => onCloseModal();


return ( return (

+ 4
- 2
src/pages/FilesPage/FileTable.js Näytä tiedosto

}, [data]); }, [data]);


const getTotalNumberOfPages = (data) => { const getTotalNumberOfPages = (data) => {
if (data !== null && !data.total) return 1;

return parseInt(data.total) <= PAGE_SIZE_FILES return parseInt(data.total) <= PAGE_SIZE_FILES
? 1 ? 1
: Math.ceil(parseInt(data.total) / PAGE_SIZE_FILES); : Math.ceil(parseInt(data.total) / PAGE_SIZE_FILES);
}, },
}) })
); );
setFile(null)
setFile(null);
}; };


const input = ( const input = (
/> />
<CustomModal <CustomModal
classes="files-viewer-custom-modal" classes="files-viewer-custom-modal"
open={file && matches}
open={file !== null && matches !== null ? file && matches : false}
onCloseModal={() => setFile(null)} onCloseModal={() => setFile(null)}
> >
{file !== null ? ( {file !== null ? (

Loading…
Peruuta
Tallenna