File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ export const App = () => {
8484
8585 < div
8686 className = { clsx (
87- 'layoutLayers' ,
88- layout === 'cards' ? 'cardsLayout hideScrollBar ' : 'gridLayout'
87+ 'layoutLayers hideScrollBar ' ,
88+ layout === 'cards' ? 'cardsLayout' : 'gridLayout'
8989 ) } >
9090 { isDNDModeActive ( ) && < DNDLayout /> }
9191 < AppContentLayout />
Original file line number Diff line number Diff line change 11import useInfiniteScroll from 'react-infinite-scroll-hook'
22import { PropagateLoader } from 'react-spinners'
33import { useGetFeed } from 'src/features/cards'
4+ import { trackFeedScroll } from 'src/lib/analytics'
45import { useUserPreferences } from 'src/stores/preferences'
56import './feed.css'
67import { AdvFeedItem } from './feedItems/AdvFeedItem'
@@ -24,7 +25,10 @@ export const Feed = () => {
2425 const [ infiniteRef , { rootRef} ] = useInfiniteScroll ( {
2526 loading : isLoading ,
2627 hasNextPage : Boolean ( hasNextPage ) ,
27- onLoadMore : fetchNextPage ,
28+ onLoadMore : ( ) => {
29+ fetchNextPage ( )
30+ trackFeedScroll ( )
31+ } ,
2832 disabled : Boolean ( error ) ,
2933 rootMargin : '0px 0px 100% 0px' ,
3034 } )
@@ -46,7 +50,7 @@ export const Feed = () => {
4650 }
4751
4852 return (
49- < div ref = { rootRef } className = "feed scrollable" style = { { overflow : 'auto' , maxHeight : '100vh ' } } >
53+ < div ref = { rootRef } className = "feed scrollable" style = { { overflow : 'auto' , maxHeight : '100% ' } } >
5054
5155 < div key = { `adv` } className = "feedItem" >
5256 < AdvFeedItem />
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ enum Objects {
2222 RSS = 'Rss' ,
2323 DO_NOT_DISTURB = 'DND' ,
2424 DISPLAY_LAYOUT = 'Display Layout' ,
25+ FEED = 'Feed' ,
2526}
2627
2728enum Verbs {
@@ -417,6 +418,12 @@ export const trackDisplayTypeChange = (value: "grid" | "cards") => {
417418 } )
418419}
419420
421+ export const trackFeedScroll = ( ) => {
422+ trackEvent ( {
423+ object : Objects . FEED ,
424+ verb : Verbs . SCROLL
425+ } )
426+ }
420427// Identification
421428
422429export const identifyUserLanguages = ( languages : string [ ] ) => {
You can’t perform that action at this time.
0 commit comments