Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ export function General({ onOpenChange }: GeneralProps) {
alt={profile?.name || 'User'}
width={36}
height={36}
unoptimized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Unconditionally disabling optimization means all images (including local ones) bypass Next.js optimization. Consider conditionally applying unoptimized based on URL:

Suggested change
unoptimized
unoptimized={imageUrl?.startsWith('http')}

This matches the pattern used in user-avatar.tsx:58 and avatars.tsx:65.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/general/general.tsx
Line: 294:294

Comment:
**style:** Unconditionally disabling optimization means all images (including local ones) bypass Next.js optimization. Consider conditionally applying `unoptimized` based on URL:

```suggestion
                    unoptimized={imageUrl?.startsWith('http')}
```

This matches the pattern used in `user-avatar.tsx:58` and `avatars.tsx:65`.

How can I resolve this? If you propose a fix, please make it concise.

className={`h-full w-full object-cover transition-opacity duration-300 ${
isUploadingProfilePicture ? 'opacity-50' : 'opacity-100'
}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export function TemplateProfile() {
alt={formData.name || 'Profile picture'}
width={36}
height={36}
unoptimized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Unconditionally disabling optimization means all images (including local ones) bypass Next.js optimization. Consider conditionally applying unoptimized based on URL:

Suggested change
unoptimized
unoptimized={profilePictureUrl?.startsWith('http')}

This matches the pattern used in other avatar components like user-avatar.tsx:58.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/settings-modal/components/template-profile/template-profile.tsx
Line: 351:351

Comment:
**style:** Unconditionally disabling optimization means all images (including local ones) bypass Next.js optimization. Consider conditionally applying `unoptimized` based on URL:

```suggestion
                          unoptimized={profilePictureUrl?.startsWith('http')}
```

This matches the pattern used in other avatar components like `user-avatar.tsx:58`.

How can I resolve this? If you propose a fix, please make it concise.

className={`h-full w-full object-cover transition-opacity duration-300 ${
isUploadingProfilePicture ? 'opacity-50' : 'opacity-100'
}`}
Expand Down