Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / applications / drive / src / app / components / sections / Drive / ToolbarButtons / UploadFolderButton.tsx
blob43d0f804bdf4f44b458d7563f641d459c958c4d0
1 import { c } from 'ttag';
3 import { Icon, ToolbarButton } from '@proton/components';
5 import { useActiveShare } from '../../../../hooks/drive/useActiveShare';
6 import { useFolderUploadInput } from '../../../../store';
8 const UploadFolderButton = () => {
9     const { activeFolder } = useActiveShare();
10     const {
11         inputRef: fileInput,
12         handleClick: handleUploadFolder,
13         handleChange,
14     } = useFolderUploadInput(activeFolder.shareId, activeFolder.linkId);
16     return (
17         <>
18             <input type="file" ref={fileInput} className="hidden" onChange={handleChange} />
19             <ToolbarButton
20                 data-testid="toolbar-upload-folder"
21                 icon={<Icon name="folder-arrow-up" alt={c('Action').t`Upload folder`} />}
22                 title={c('Action').t`Upload folder`}
23                 onClick={handleUploadFolder}
24             />
25         </>
26     );
29 export default UploadFolderButton;