Skip to content

Commit

Permalink
fix: add tracking on lotsByArtistsYouFollow screen (#9360)
Browse files Browse the repository at this point in the history
* fix: add tracking on lotsByArtistsYouFollow screen

* chore: bump cohesion
  • Loading branch information
gkartalis authored Sep 29, 2023
1 parent cbbcfa4 commit e6caf8c
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/app/Scenes/LotsByArtistsYouFollow/LotsByArtistsYouFollow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { OwnerType } from "@artsy/cohesion"
import { Spacer, SimpleMessage } from "@artsy/palette-mobile"
import { LotsByArtistsYouFollowQuery } from "__generated__/LotsByArtistsYouFollowQuery.graphql"
import { LotsByArtistsYouFollow_me$key } from "__generated__/LotsByArtistsYouFollow_me.graphql"
Expand All @@ -8,6 +9,8 @@ import { PAGE_SIZE } from "app/Components/constants"
import { extractNodes } from "app/utils/extractNodes"
import { ProvidePlaceholderContext } from "app/utils/placeholders"
import { useRefreshControl } from "app/utils/refreshHelpers"
import { ProvideScreenTrackingWithCohesionSchema } from "app/utils/track"
import { screen } from "app/utils/track/helpers"
import { Suspense } from "react"
import { graphql, useLazyLoadQuery, usePaginationFragment } from "react-relay"

Expand All @@ -28,18 +31,22 @@ export const LotsByArtistsYouFollow: React.FC = () => {
const artworks = extractNodes(data?.lotsByFollowedArtistsConnection)

return (
<PageWithSimpleHeader title={SCREEN_TITLE}>
<MasonryInfiniteScrollArtworkGrid
artworks={artworks}
ListEmptyComponent={
<SimpleMessage m={2}>Nothing yet. Please check back later.</SimpleMessage>
}
hasMore={hasNext}
loadMore={() => loadNext(PAGE_SIZE)}
isLoading={isLoadingNext}
refreshControl={RefreshControl}
/>
</PageWithSimpleHeader>
<ProvideScreenTrackingWithCohesionSchema
info={screen({ context_screen_owner_type: OwnerType.lotsByArtistsYouFollow })}
>
<PageWithSimpleHeader title={SCREEN_TITLE}>
<MasonryInfiniteScrollArtworkGrid
artworks={artworks}
ListEmptyComponent={
<SimpleMessage m={2}>Nothing yet. Please check back later.</SimpleMessage>
}
hasMore={hasNext}
loadMore={() => loadNext(PAGE_SIZE)}
isLoading={isLoadingNext}
refreshControl={RefreshControl}
/>
</PageWithSimpleHeader>
</ProvideScreenTrackingWithCohesionSchema>
)
}

Expand Down

0 comments on commit e6caf8c

Please sign in to comment.