♻️ (builder) Remove barrel export and flatten folder arch

This commit is contained in:
Baptiste Arnaud
2023-03-15 11:51:30 +01:00
parent cbc8194f19
commit 44d7a0bcb8
498 changed files with 1542 additions and 1786 deletions

View File

@@ -0,0 +1,11 @@
import imageCompression from 'browser-image-compression'
export const compressFile = async (file: File) => {
const options = {
maxSizeMB: 0.5,
maxWidthOrHeight: 1600,
}
return ['image/jpg', 'image/jpeg', 'image/png'].includes(file.type)
? imageCompression(file, options)
: file
}