Unify dropzone accept prop with accept helpers

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-31 16:50:54 +04:00
parent 3bac29f540
commit 687148e2c1
8 changed files with 122 additions and 69 deletions

View File

@@ -12,6 +12,7 @@
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
import { acceptImage } from "@probo/helpers";
import { useTranslate } from "@probo/i18n";
import {
Button,
@@ -238,11 +239,7 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
description={__("Upload logo image (PNG, JPG, WEBP up to 5MB)")}
isUploading={isSubmitting}
onDrop={handleDrop}
accept={{
"image/png": [".png"],
"image/jpeg": [".jpg", ".jpeg"],
"image/webp": [".webp"],
}}
accept={acceptImage}
maxSize={5}
/>
{uploadedFile && (