Skip to content

Commit

Permalink
refactor: drop deprecated TuiImgLazyLoading (#9366)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 8, 2024
1 parent 8217c90 commit aaaabfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions projects/kit/components/avatar/avatar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import {
tuiAppearanceOptionsProvider,
TuiWithAppearance,
} from '@taiga-ui/core/directives/appearance';
import {TuiImgLazyLoading} from '@taiga-ui/kit/directives';

import {TUI_AVATAR_OPTIONS} from './avatar.options';

@Component({
standalone: true,
selector: 'tui-avatar,button[tuiAvatar],a[tuiAvatar]',
imports: [NgSwitch, NgSwitchCase, NgSwitchDefault, TuiIcon, TuiImgLazyLoading],
imports: [NgSwitch, NgSwitchCase, NgSwitchDefault, TuiIcon],
templateUrl: './avatar.template.html',
styleUrls: ['./avatar.style.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -39,10 +38,6 @@ export class TuiAvatar {
@Input()
public src?: SafeResourceUrl | string | null;

protected get safeSrc(): string {
return this.src?.toString() ?? '';
}

protected get value(): SafeResourceUrl | string {
return this.src || '';
}
Expand Down
2 changes: 1 addition & 1 deletion projects/kit/components/avatar/avatar.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img
*ngSwitchCase="'img'"
alt=""
tuiLoading="lazy"
loading="lazy"
[src]="value"
/>
<tui-icon
Expand Down

0 comments on commit aaaabfb

Please sign in to comment.