MCPcopy Create free account
hub / github.com/dailydotdev/apps / getFeedPageLayoutComponent

Function getFeedPageLayoutComponent

packages/shared/src/hooks/useFeedLayout.ts:103–122  ·  view source on GitHub ↗
({
  shouldUseListFeedLayoutOnMobileTablet,
  shouldUseCommentFeedLayout,
  shouldUseListMode,
  isSearchPageLaptop,
}: GetFeedPageLayoutComponentProps)

Source from the content-addressed store, hash-verified

101}
102
103const 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
124export const useFeedLayout = ({
125 feedRelated = true,

Callers 1

useFeedLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected