From 32454bab61edc8c696a521eba6bfb093b9e2500a Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 06:30:46 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../settings/profile/profile-form.tsx | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx index 2b3986c34..e922d8256 100644 --- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx +++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx @@ -257,8 +257,16 @@ export const ProfileForm = () => { onValueChange={(e) => { field.onChange(e); }} - defaultValue={field.value?.startsWith('data:') ? 'upload' : field.value} - value={field.value?.startsWith('data:') ? 'upload' : field.value} + defaultValue={ + field.value?.startsWith("data:") + ? "upload" + : field.value + } + value={ + field.value?.startsWith("data:") + ? "upload" + : field.value + } className="flex flex-row flex-wrap gap-2 max-xl:justify-center" > @@ -289,17 +297,31 @@ export const ProfileForm = () => {
document.getElementById('avatar-upload')?.click()} + onClick={() => + document + .getElementById("avatar-upload") + ?.click() + } > - {field.value?.startsWith('data:') ? ( + {field.value?.startsWith("data:") ? ( Custom avatar ) : ( - - + + )}
@@ -313,12 +335,15 @@ export const ProfileForm = () => { if (file) { // max file size 5mb if (file.size > 5 * 1024 * 1024) { - toast.error('Image size must be less than 5MB'); + toast.error( + "Image size must be less than 5MB", + ); return; } const reader = new FileReader(); reader.onload = (event) => { - const result = event.target?.result as string; + const result = event.target + ?.result as string; field.onChange(result); }; reader.readAsDataURL(file);