Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

allow webp, reduce max size to 5MB

Steven Tey107d4e27f317
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/resources/add-logo-modal.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/resources/add-logo-modal.tsx
index c7e450390a..090f9d8079 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/resources/add-logo-modal.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/resources/add-logo-modal.tsx
@@ -141,8 +141,8 @@ function AddLogoModalInner({ setShowAddLogoModal }: AddLogoModalProps) {
setValue("name", nameWithoutExtension || file.name);
}
}}
- content="SVG, JPG, or PNG, max size of 10MB"
- maxFileSizeMB={10}
+ content="SVG, JPG, PNG, or WEBP, max size of 5MB"
+ maxFileSizeMB={5}
/>
)}
/>
diff --git a/apps/web/ui/partners/design/modals/add-block-modal.tsx b/apps/web/ui/partners/design/modals/add-block-modal.tsx
index 233368444e..0700ffaedf 100644
--- a/apps/web/ui/partners/design/modals/add-block-modal.tsx
+++ b/apps/web/ui/partners/design/modals/add-block-modal.tsx
@@ -74,7 +74,7 @@ export const DESIGNER_BLOCKS: ({
{
id: "earnings-calculator",
label: "Earnings Calculator",
- description: "Calculate potential earnings for your program",
+ description: "Show partners how much they can earn..",
modal: EarningsCalculatorBlockModal,
icon: Calculator,
},
diff --git a/apps/web/ui/partners/design/modals/image-block-modal.tsx b/apps/web/ui/partners/design/modals/image-block-modal.tsx
index b8cbdd74dd..a78efb02e1 100644
--- a/apps/web/ui/partners/design/modals/image-block-modal.tsx
+++ b/apps/web/ui/partners/design/modals/image-block-modal.tsx
@@ -144,8 +144,8 @@ function ImageBlockModalInner({
readFile
loading={isUploading}
onChange={({ file }) => handleUpload(file)}
- content="SVG, JPG, or PNG, max size of 10MB"
- maxFileSizeMB={10}
+ content="SVG, JPG, PNG, or WEBP, max size of 5MB"
+ maxFileSizeMB={5}
/>
)}
/>
diff --git a/packages/ui/src/file-upload.tsx b/packages/ui/src/file-upload.tsx
index f3fb49a18e..dbeb259630 100644
--- a/packages/ui/src/file-upload.tsx
+++ b/packages/ui/src/file-upload.tsx
@@ -39,11 +39,10 @@ const acceptFileTypes: Record<
types: documentTypes,
errorMessage: "File type not supported (document files only)",
},
-
// TODO: allow custom `accept` prop so we don't need specific options here
programResourceImages: {
- types: ["image/svg+xml", "image/png", "image/jpeg"],
- errorMessage: "File type not supported (.svg., .png, or .jpg only)",
+ types: ["image/svg+xml", "image/png", "image/jpeg", "image/webp"],
+ errorMessage: "File type not supported (.svg, .png, .jpg, or .webp only)",
},
programResourceFiles: {
types: [...documentTypes, "application/zip"],