Function
getFeedPageLayoutComponent
({
shouldUseListFeedLayoutOnMobileTablet,
shouldUseCommentFeedLayout,
shouldUseListMode,
isSearchPageLaptop,
}: GetFeedPageLayoutComponentProps)
Source from the content-addressed store, hash-verified
| 93 | } |
| 94 | |
| 95 | const getFeedPageLayoutComponent = ({ |
| 96 | shouldUseListFeedLayoutOnMobileTablet, |
| 97 | shouldUseCommentFeedLayout, |
| 98 | shouldUseListMode, |
| 99 | isSearchPageLaptop, |
| 100 | }: GetFeedPageLayoutComponentProps): UseFeedLayoutReturn['FeedPageLayoutComponent'] => { |
| 101 | if (shouldUseCommentFeedLayout) { |
| 102 | return CommentFeedPage; |
| 103 | } |
| 104 | |
| 105 | if (shouldUseListMode && !isSearchPageLaptop) { |
| 106 | return FeedPageLayoutList; |
| 107 | } |
| 108 | |
| 109 | if (shouldUseListFeedLayoutOnMobileTablet) { |
| 110 | return FeedPageLayoutMobile; |
| 111 | } |
| 112 | |
| 113 | return FeedPage; |
| 114 | }; |
| 115 | |
| 116 | export const useFeedLayout = ({ |
| 117 | feedRelated = true, |
Tested by
no test coverage detected