Skip to content

Commit

Permalink
Timeline util: Add filter for "For You" (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon authored Feb 16, 2025
1 parent affebf8 commit 151709c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/timeline_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export const followingTimelineSelector = createSelector(
`[data-timeline-id^="${'following-'}"]`
);

export const forYouTimelineFilter = ({ dataset: { timeline, timelineId } }) =>
timeline?.startsWith('/v2/tabs/for_you') ||
timelineId === '/dashboard/stuff_for_you' ||
timelineId?.startsWith('for-you-');

// includes "channel" user blog view page
export const anyBlogTimelineFilter = ({ dataset: { timeline, timelineId } }) =>
timeline?.match(exactly(`/v2/blog/${anyBlog}/posts`)) ||
Expand Down

0 comments on commit 151709c

Please sign in to comment.