From 8378c345d1791caf7a4d0a0fd6ed02229f5a723f Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Mon, 29 Sep 2025 02:39:47 +0000
Subject: [PATCH] Refactor: Limit avatar upload size
---
src/components/settings/AccountProfileTab.tsx | 1 +
src/components/upload/PhotoUpload.tsx | 16 +++++++++-------
src/pages/Profile.tsx | 2 +-
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/components/settings/AccountProfileTab.tsx b/src/components/settings/AccountProfileTab.tsx
index c4daba14..cc2b221e 100644
--- a/src/components/settings/AccountProfileTab.tsx
+++ b/src/components/settings/AccountProfileTab.tsx
@@ -154,6 +154,7 @@ export function AccountProfileTab() {
- JPEG, PNG, WebP up to 10MB
+ JPEG, PNG, WebP up to {maxSizeMB}MB
{isAvatar ? (
- <>Drag & drop or click to browse
JPEG, PNG, WebP up to 10MB>
+ <>Drag & drop or click to browse
JPEG, PNG, WebP up to {maxSizeMB}MB>
) : canUploadMore ? (
- <>Drag & drop or click to browse
JPEG, PNG, WebP up to 10MB each>
+ <>Drag & drop or click to browse
JPEG, PNG, WebP up to {maxSizeMB}MB each>
) : (
`Maximum ${actualMaxFiles} ${actualMaxFiles === 1 ? 'photo' : 'photos'} allowed`
)}
diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx
index 49ba27af..f6561864 100644
--- a/src/pages/Profile.tsx
+++ b/src/pages/Profile.tsx
@@ -349,7 +349,7 @@ export default function Profile() {