Skip to content

Commit 8d564bc

Browse files
remove destroyref since it is route observable
1 parent 6d77523 commit 8d564bc

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/app/social/social.service.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ import {
33
isPlatformBrowser,
44
} from '@angular/common';
55
import {
6-
DestroyRef,
76
Inject,
87
inject,
98
Injectable,
109
PLATFORM_ID,
1110
} from '@angular/core';
12-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
1311
import {
1412
ChildActivationEnd,
1513
Router,
@@ -25,8 +23,6 @@ import { environment } from '../../environments/environment';
2523

2624
@Injectable( { providedIn: 'root' } )
2725
export class SocialService {
28-
private destroyRef = inject(DestroyRef);
29-
3026
private showOnCurrentRouteSubject = new BehaviorSubject(false);
3127

3228
/**
@@ -110,8 +106,7 @@ export class SocialService {
110106

111107
const showSocialButtons = this.activatedRouteDataChanges$.pipe(
112108
map(data => data?.showSocialButtons === true),
113-
distinctUntilChanged(),
114-
takeUntilDestroyed(this.destroyRef),
109+
distinctUntilChanged()
115110
);
116111

117112
showSocialButtons.subscribe(this.showOnCurrentRouteSubject);

0 commit comments

Comments
 (0)