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

Function getFeedPageLayoutComponent

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

Source from the content-addressed store, hash-verified

93}
94
95const 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
116export const useFeedLayout = ({
117 feedRelated = true,

Callers 1

useFeedLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected