import React from 'react' ; export default function useFileTransferDialogs ( ) { const [ isUploadOpen , setUploadOpen ] = React . useState ( false ) ; const [ isDownloadOpen , setDownloadOpen ] = React . useState ( false ) ; function openDownload ( ) { setDownloadOpen ( true ) ; } function openUpload ( ) { setUploadOpen ( true ) ; } function close ( ) { setUploadOpen ( false ) ; setDownloadOpen ( false ) ; } return { isUploadOpen , isDownloadOpen , close , openDownload , openUpload , } ; }