@@ -20,10 +20,8 @@ import {
20
20
FeatureConfigService ,
21
21
ScrollBehavior ,
22
22
WindowRef ,
23
- AnonymousConsentsService ,
24
- useFeatureStyles ,
25
23
} from '@spartacus/core' ;
26
- import { take , Observable } from 'rxjs' ;
24
+ import { take } from 'rxjs/operators ' ;
27
25
import { CmsComponentData } from '../../../cms-structure/page/model/cms-component-data' ;
28
26
import { SelectFocusUtility } from '../../../layout/a11y/index' ;
29
27
import { ICON_TYPE } from '../../misc/icon/icon.model' ;
@@ -39,7 +37,6 @@ export class ScrollToTopComponent implements OnInit {
39
37
@HostBinding ( 'class.display' )
40
38
display : boolean | undefined ;
41
39
42
- protected elevatedPosition$ : Observable < boolean > | undefined ;
43
40
protected window : Window | undefined = this . winRef . nativeWindow ;
44
41
protected scrollBehavior : ScrollBehavior = ScrollBehavior . SMOOTH ;
45
42
protected displayThreshold : number = ( this . window ?. innerHeight ?? 400 ) / 2 ;
@@ -52,26 +49,15 @@ export class ScrollToTopComponent implements OnInit {
52
49
@Optional ( ) protected featureConfigService = inject ( FeatureConfigService , {
53
50
optional : true ,
54
51
} ) ;
55
- @Optional ( ) protected anonymousConsentsService = inject (
56
- AnonymousConsentsService ,
57
- {
58
- optional : true ,
59
- }
60
- ) ;
61
52
62
53
constructor (
63
54
protected winRef : WindowRef ,
64
55
protected componentData : CmsComponentData < CmsScrollToTopComponent > ,
65
56
protected selectFocusUtility : SelectFocusUtility
66
- ) {
67
- useFeatureStyles ( 'a11yScrollToTopPositioning' ) ;
68
- }
57
+ ) { }
69
58
70
59
ngOnInit ( ) : void {
71
60
this . setConfig ( ) ;
72
- if ( this . featureConfigService ?. isEnabled ( 'a11yScrollToTopPositioning' ) ) {
73
- this . elevatedPosition$ = this . anonymousConsentsService ?. isBannerVisible ( ) ;
74
- }
75
61
}
76
62
77
63
@HostListener ( 'window:scroll' , [ '$event' ] )
0 commit comments