@@ -52,6 +52,8 @@ import { IdleModalComponent } from './shared/idle-modal/idle-modal.component';
5252import { CSSVariableService } from './shared/sass-helper/css-variable.service' ;
5353import { HostWindowState } from './shared/search/host-window.reducer' ;
5454import { ThemeService } from './shared/theme-support/theme.service' ;
55+ import { SocialComponent } from './social/social.component' ;
56+ import { SocialService } from './social/social.service' ;
5557
5658@Component ( {
5759 selector : 'ds-app' ,
@@ -60,6 +62,7 @@ import { ThemeService } from './shared/theme-support/theme.service';
6062 changeDetection : ChangeDetectionStrategy . OnPush ,
6163 imports : [
6264 AsyncPipe ,
65+ SocialComponent ,
6366 ThemedRootComponent ,
6467 ] ,
6568} )
@@ -87,6 +90,11 @@ export class AppComponent implements OnInit, AfterViewInit {
8790 */
8891 idleModalOpen : boolean ;
8992
93+ /**
94+ * In order to show sharing component only in csr
95+ */
96+ browserPlatform = false ;
97+
9098 constructor (
9199 @Inject ( NativeWindowService ) private _window : NativeWindowRef ,
92100 @Inject ( DOCUMENT ) private document : any ,
@@ -99,16 +107,20 @@ export class AppComponent implements OnInit, AfterViewInit {
99107 private cssService : CSSVariableService ,
100108 private modalService : NgbModal ,
101109 private modalConfig : NgbModalConfig ,
110+ private socialService : SocialService ,
102111 ) {
103112 this . notificationOptions = environment . notifications ;
113+ this . browserPlatform = isPlatformBrowser ( this . platformId ) ;
104114
105- if ( isPlatformBrowser ( this . platformId ) ) {
115+ if ( this . browserPlatform ) {
106116 this . trackIdleModal ( ) ;
107117 }
108118
109119 this . isThemeLoading$ = this . themeService . isThemeLoading$ ;
110120
111121 this . storeCSSVariables ( ) ;
122+
123+ this . socialService . initialize ( ) ;
112124 }
113125
114126 ngOnInit ( ) {
0 commit comments