feat: brand settings

This commit is contained in:
Jannat Patel
2024-09-26 12:09:58 +05:30
parent 04552bdef6
commit e18f0c9dad
11 changed files with 304 additions and 114 deletions

View File

@@ -499,3 +499,10 @@ export function singularize(word) {
(r) => endings[r]
)
}
export const validateFile = (file) => {
let extension = file.name.split('.').pop().toLowerCase()
if (!['jpg', 'jpeg', 'png', 'webp'].includes(extension)) {
return __('Only image file is allowed.')
}
}