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